use of com.android.settings.graph.UsageView in project platform_packages_apps_Settings by BlissRoms.
the class BatteryHistoryPreference method onBindViewHolder.
@Override
public void onBindViewHolder(PreferenceViewHolder view) {
super.onBindViewHolder(view);
final long startTime = System.currentTimeMillis();
if (mBatteryInfo == null) {
return;
}
((TextView) view.findViewById(R.id.charge)).setText(mBatteryInfo.batteryPercentString);
mSummaryView = (TextView) view.findViewById(R.id.bottom_summary);
if (mSummary != null) {
mSummaryView.setText(mSummary);
}
if (hideSummary) {
mSummaryView.setVisibility(View.GONE);
}
UsageView usageView = (UsageView) view.findViewById(R.id.battery_usage);
usageView.findViewById(R.id.label_group).setAlpha(.7f);
mBatteryInfo.bindHistory(usageView);
BatteryUtils.logRuntime(TAG, "onBindViewHolder", startTime);
}
Aggregations