Create Advanced battery page
The advanced page shows two major parts, one is the battery usage graph and the other is battery usage list. In usage list, each item shows basic info of battery usage of one type(e.g. Apps, System) Bug: 34385770 Test: RunSettingsRoboTests Change-Id: I22475a489285787afa775af8d5ae3340eff1eed9
This commit is contained in:
@@ -17,17 +17,23 @@ package com.android.settings;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.content.res.TypedArray;
|
||||
import android.support.annotation.ColorInt;
|
||||
import android.support.v7.preference.Preference;
|
||||
import android.support.v7.preference.PreferenceViewHolder;
|
||||
import android.util.AttributeSet;
|
||||
import android.widget.ImageView;
|
||||
|
||||
public class TintablePreference extends Preference {
|
||||
|
||||
@ColorInt
|
||||
private int mTintColor;
|
||||
|
||||
public TintablePreference(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TintablePreference);
|
||||
mTintColor = a.getColor(R.styleable.TintablePreference_android_tint, 0);
|
||||
a.recycle();
|
||||
}
|
||||
|
||||
public void setTint(int color) {
|
||||
|
Reference in New Issue
Block a user