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 BluetoothDevicePreference extends Preference implements
mCachedDevice = cachedDevice;
mAccessibleProfile = accessibleProfile;
setLayoutResource(R.layout.preference_bluetooth);
setWidgetLayoutResource(R.layout.preference_bluetooth);
cachedDevice.registerCallback(this);
@@ -127,7 +127,7 @@ public class BluetoothDevicePreference extends Preference implements
super.onBindView(view);
ImageView btClass = (ImageView) view.findViewById(R.id.btClass);
ImageView btClass = (ImageView) view.findViewById(android.R.id.icon);
btClass.setImageResource(mCachedDevice.getBtClassDrawable());
btClass.setAlpha(isEnabled() ? 255 : sDimAlpha);