Use the new Preference:icon attribute and placeholder for showing icons on the left.

This commit is contained in:
Amith Yamasani
2010-11-17 15:21:18 -08:00
parent 8ba83bf5ff
commit 43a673053f
11 changed files with 17 additions and 136 deletions

View File

@@ -64,7 +64,7 @@ public class PowerGaugePreference extends Preference {
return mInfo;
}
void setIcon(Drawable icon) {
void setPowerIcon(Drawable icon) {
mIcon = icon;
notifyChanged();
}

View File

@@ -734,7 +734,7 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
(PowerGaugePreference) findPreference(
Integer.toString(bs.uidObj.getUid()));
if (pgp != null) {
pgp.setIcon(bs.icon);
pgp.setPowerIcon(bs.icon);
pgp.setPercent(bs.percent);
pgp.setTitle(bs.name);
}