limitations under the License.
-->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:gravity="center_vertical"
- android:paddingLeft="16dip"
- android:paddingRight="?android:attr/scrollbarSize">
-
- <ImageView
- android:id="@+id/providerIcon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="5dip"
- android:layout_gravity="center" />
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="6dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="6dip"
- android:layout_weight="1">
-
- <TextView android:id="@+android:id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceMedium" />
-
- <TextView android:id="@+android:id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/title"
- android:layout_alignLeft="@android:id/title"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:maxLines="2" />
-
- </RelativeLayout>
-
- <ImageView
+<ImageView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/syncStatusIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginLeft="5dip"
- android:layout_marginRight="7dip"
android:layout_gravity="center" />
-
-</LinearLayout>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:gravity="center_vertical"
- android:paddingLeft="16dip"
- android:paddingRight="?android:attr/scrollbarSize">
+ android:gravity="center_vertical">
- <ImageView
- android:id="@+id/btClass"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="12dip"
- android:layout_gravity="center_vertical" />
-
- <RelativeLayout
+ <LinearLayout android:id="@+id/profileIcons"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginRight="6dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="6dip"
- android:layout_weight="1">
-
- <!-- Device name -->
- <TextView android:id="@+android:id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <!-- Status summary -->
- <TextView android:id="@+android:id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/title"
- android:layout_alignLeft="@android:id/title"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:maxLines="2" />
-
- <LinearLayout android:id="@+id/profileIcons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
- />
- </RelativeLayout>
+ android:layout_centerVertical="true"
+ android:layout_alignParentRight="true"
+ />
<!-- Divider -->
<ImageView
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:minHeight="?android:attr/listPreferredItemHeight"
- android:gravity="center_vertical"
- android:paddingLeft="16dip"
- android:paddingRight="?android:attr/scrollbarSize">
-
- <ImageView
- android:id="@+id/profileIcon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="12dip"
- android:layout_gravity="center_vertical" />
-
- <RelativeLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginRight="6dip"
- android:layout_marginTop="6dip"
- android:layout_marginBottom="6dip"
- android:layout_weight="1">
-
- <!-- Device name -->
- <TextView android:id="@+android:id/title"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceLarge" />
-
- <!-- Status summary -->
- <TextView android:id="@+android:id/summary"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_below="@android:id/title"
- android:layout_alignLeft="@android:id/title"
- android:textAppearance="?android:attr/textAppearanceSmall"
- android:maxLines="2" />
-
- <LinearLayout android:id="@+id/profileIcons"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_centerVertical="true"
- android:layout_alignParentRight="true"
- />
- </RelativeLayout>
+ android:gravity="center_vertical">
<!-- Divider -->
<ImageView
mAccount = account;
mAuthorities = authorities;
mProviderIcon = icon;
- setLayoutResource(R.layout.account_preference);
+ setWidgetLayoutResource(R.layout.account_preference);
setTitle(mAccount.name);
setSummary("");
// Add account info to the intent for AccountSyncSettings
protected void onBindView(View view) {
super.onBindView(view);
setSummary(getSyncStatusMessage(mStatus));
- mProviderIconView = (ImageView) view.findViewById(R.id.providerIcon);
+ mProviderIconView = (ImageView) view.findViewById(android.R.id.icon);
mProviderIconView.setImageDrawable(mProviderIcon);
mSyncStatusIcon = (ImageView) view.findViewById(R.id.syncStatusIcon);
mSyncStatusIcon.setImageResource(getSyncStatusIcon(mStatus));
mCachedDevice = cachedDevice;
mAccessibleProfile = accessibleProfile;
- setLayoutResource(R.layout.preference_bluetooth);
+ setWidgetLayoutResource(R.layout.preference_bluetooth);
cachedDevice.registerCallback(this);
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);
mProfile = profile;
- setLayoutResource(R.layout.preference_bluetooth_profile);
+ setWidgetLayoutResource(R.layout.preference_bluetooth_profile);
setExpanded(false);
}
protected void onBindView(View view) {
super.onBindView(view);
- ImageView btProfile = (ImageView) view.findViewById(R.id.profileIcon);
+ ImageView btProfile = (ImageView) view.findViewById(android.R.id.icon);
btProfile.setImageDrawable(mProfileDrawable);
mProfileExpandView = (ImageView) view.findViewById(R.id.profileExpand);
CheckBoxPreference autoConnectPref = mAutoConnectPrefs.get(prof.toString());
if (autoConnectPref == null) {
autoConnectPref = new CheckBoxPreference(getActivity());
+ autoConnectPref.setLayoutResource(com.android.internal.R.layout.preference_child);
autoConnectPref.setKey(prof.toString() + AUTO_CONNECT_KEY_SUFFIX);
autoConnectPref.setTitle(getCheckBoxTitle(prof));
autoConnectPref.setOrder(getProfilePreferenceIndex(prof) + 1);
return mInfo;
}
- void setIcon(Drawable icon) {
+ void setPowerIcon(Drawable icon) {
mIcon = icon;
notifyChanged();
}
(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);
}