Fix bug #13440372 More option is displayed with Email/Gmail icon after...
scrolling through settings options - force the image and background to null when needed in the Adapter Change-Id: If4c1769dcd1651b683a34001dcd922c6554252c0
This commit is contained in:
@@ -1580,9 +1580,6 @@ public class SettingsActivity extends Activity
|
|||||||
view.findViewById(com.android.internal.R.id.summary);
|
view.findViewById(com.android.internal.R.id.summary);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (holder.mIcon != null) {
|
|
||||||
holder.mIcon.setBackgroundResource(R.color.background_drawer_icon);
|
|
||||||
}
|
|
||||||
view.setTag(holder);
|
view.setTag(holder);
|
||||||
} else {
|
} else {
|
||||||
view = convertView;
|
view = convertView;
|
||||||
@@ -1650,7 +1647,18 @@ public class SettingsActivity extends Activity
|
|||||||
Drawable icon = mAuthHelper.getDrawableForType(getContext(), accType);
|
Drawable icon = mAuthHelper.getDrawableForType(getContext(), accType);
|
||||||
setHeaderIcon(holder, icon);
|
setHeaderIcon(holder, icon);
|
||||||
} else {
|
} else {
|
||||||
holder.mIcon.setImageResource(header.iconRes);
|
if (header.iconRes > 0) {
|
||||||
|
holder.mIcon.setImageResource(header.iconRes);
|
||||||
|
} else {
|
||||||
|
holder.mIcon.setImageDrawable(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (holder.mIcon != null) {
|
||||||
|
if (header.iconRes > 0) {
|
||||||
|
holder.mIcon.setBackgroundResource(R.color.background_drawer_icon);
|
||||||
|
} else {
|
||||||
|
holder.mIcon.setBackground(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
holder.mTitle.setText(header.getTitle(getContext().getResources()));
|
holder.mTitle.setText(header.getTitle(getContext().getResources()));
|
||||||
CharSequence summary = header.getSummary(getContext().getResources());
|
CharSequence summary = header.getSummary(getContext().getResources());
|
||||||
|
Reference in New Issue
Block a user