Ensure preference icon is returned when inflated from XML even if it has not been displayed yet.
am: f049e24c64
Change-Id: Iab0a315f916fe7da2b2a523f364be5a6842aadbd
This commit is contained in:
@@ -719,6 +719,9 @@ public class Preference implements Comparable<Preference> {
|
||||
* @see #setIcon(Drawable)
|
||||
*/
|
||||
public Drawable getIcon() {
|
||||
if (mIcon == null && mIconResId != 0) {
|
||||
mIcon = getContext().getDrawable(mIconResId);
|
||||
}
|
||||
return mIcon;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user