am bf80d273: am 74890242: Merge "Don\'t override dialog icon drawable unless valid resource ID was set" into lmp-mr1-dev
* commit 'bf80d2737fc59e8ae04875edddf1534c6a7739bc': Don't override dialog icon drawable unless valid resource ID was set
This commit is contained in:
@@ -466,6 +466,8 @@ public class AlertDialog extends Dialog implements DialogInterface {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the resource id of the {@link Drawable} to be used in the title.
|
* Set the resource id of the {@link Drawable} to be used in the title.
|
||||||
|
* <p>
|
||||||
|
* Takes precedence over values set using {@link #setIcon(Drawable)}.
|
||||||
*
|
*
|
||||||
* @return This Builder object to allow for chaining of calls to set methods
|
* @return This Builder object to allow for chaining of calls to set methods
|
||||||
*/
|
*/
|
||||||
@@ -485,7 +487,11 @@ public class AlertDialog extends Dialog implements DialogInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set an icon as supplied by a theme attribute. e.g. android.R.attr.alertDialogIcon
|
* Set an icon as supplied by a theme attribute. e.g.
|
||||||
|
* {@link android.R.attr#alertDialogIcon}.
|
||||||
|
* <p>
|
||||||
|
* Takes precedence over values set using {@link #setIcon(int)} or
|
||||||
|
* {@link #setIcon(Drawable)}.
|
||||||
*
|
*
|
||||||
* @param attrId ID of a theme attribute that points to a drawable resource.
|
* @param attrId ID of a theme attribute that points to a drawable resource.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -955,10 +955,10 @@ public class AlertController {
|
|||||||
if (mIcon != null) {
|
if (mIcon != null) {
|
||||||
dialog.setIcon(mIcon);
|
dialog.setIcon(mIcon);
|
||||||
}
|
}
|
||||||
if (mIconId >= 0) {
|
if (mIconId != 0) {
|
||||||
dialog.setIcon(mIconId);
|
dialog.setIcon(mIconId);
|
||||||
}
|
}
|
||||||
if (mIconAttrId > 0) {
|
if (mIconAttrId != 0) {
|
||||||
dialog.setIcon(dialog.getIconAttributeResId(mIconAttrId));
|
dialog.setIcon(dialog.getIconAttributeResId(mIconAttrId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user