Loading api/current.xml +37 −0 Original line number Diff line number Diff line Loading @@ -2116,6 +2116,17 @@ visibility="public" > </field> <field name="alertDialogIcon" type="int" transient="false" volatile="false" value="16843607" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="alertDialogStyle" type="int" transient="false" Loading Loading @@ -26610,6 +26621,19 @@ <parameter name="icon" type="android.graphics.drawable.Drawable"> </parameter> </method> <method name="setIconAttribute" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="attrId" type="int"> </parameter> </method> <method name="setInverseBackgroundForced" return="void" abstract="false" Loading Loading @@ -26807,6 +26831,19 @@ <parameter name="icon" type="android.graphics.drawable.Drawable"> </parameter> </method> <method name="setIconAttribute" return="android.app.AlertDialog.Builder" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="attrId" type="int"> </parameter> </method> <method name="setInverseBackgroundForced" return="android.app.AlertDialog.Builder" abstract="false" core/java/android/app/AlertDialog.java +24 −1 Original line number Diff line number Diff line Loading @@ -270,6 +270,17 @@ public class AlertDialog extends Dialog implements DialogInterface { mAlert.setIcon(icon); } /** * Set an icon as supplied by a theme attribute. e.g. android.R.attr.alertDialogIcon * * @param attrId ID of a theme attribute that points to a drawable resource. */ public void setIconAttribute(int attrId) { TypedValue out = new TypedValue(); mContext.getTheme().resolveAttribute(attrId, out, true); mAlert.setIcon(out.resourceId); } public void setInverseBackgroundForced(boolean forceInverseBackground) { mAlert.setInverseBackgroundForced(forceInverseBackground); } Loading Loading @@ -400,6 +411,18 @@ public class AlertDialog extends Dialog implements DialogInterface { return this; } /** * Set an icon as supplied by a theme attribute. e.g. android.R.attr.alertDialogIcon * * @param attrId ID of a theme attribute that points to a drawable resource. */ public Builder setIconAttribute(int attrId) { TypedValue out = new TypedValue(); P.mContext.getTheme().resolveAttribute(attrId, out, true); P.mIconId = out.resourceId; return this; } /** * Set a listener to be invoked when the positive button of the dialog is pressed. * @param textId The resource id of the text to display in the positive button Loading core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.RemoteException; import android.util.Log; import android.util.TypedValue; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; Loading Loading @@ -84,8 +85,10 @@ public class HeavyWeightSwitcherActivity extends Activity { button = findViewById((R.id.cancel)); button.setOnClickListener(mCancelListener); TypedValue out = new TypedValue(); getTheme().resolveAttribute(android.R.attr.alertDialogIcon, out, true); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert); out.resourceId); } void setText(int id, CharSequence text) { Loading core/java/com/android/internal/app/ShutdownThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public final class ShutdownThread extends Thread { if (confirm) { final CloseDialogReceiver closer = new CloseDialogReceiver(context); final AlertDialog dialog = new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic_dialog_alert) .setIconAttribute(android.R.attr.alertDialogIcon) .setTitle(com.android.internal.R.string.power_off) .setMessage(resourceId) .setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() { Loading core/res/res/drawable-hdpi/ic_dialog_alert_holo_dark.png 0 → 100644 +930 B Loading image diff... Loading
api/current.xml +37 −0 Original line number Diff line number Diff line Loading @@ -2116,6 +2116,17 @@ visibility="public" > </field> <field name="alertDialogIcon" type="int" transient="false" volatile="false" value="16843607" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="alertDialogStyle" type="int" transient="false" Loading Loading @@ -26610,6 +26621,19 @@ <parameter name="icon" type="android.graphics.drawable.Drawable"> </parameter> </method> <method name="setIconAttribute" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="attrId" type="int"> </parameter> </method> <method name="setInverseBackgroundForced" return="void" abstract="false" Loading Loading @@ -26807,6 +26831,19 @@ <parameter name="icon" type="android.graphics.drawable.Drawable"> </parameter> </method> <method name="setIconAttribute" return="android.app.AlertDialog.Builder" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="attrId" type="int"> </parameter> </method> <method name="setInverseBackgroundForced" return="android.app.AlertDialog.Builder" abstract="false"
core/java/android/app/AlertDialog.java +24 −1 Original line number Diff line number Diff line Loading @@ -270,6 +270,17 @@ public class AlertDialog extends Dialog implements DialogInterface { mAlert.setIcon(icon); } /** * Set an icon as supplied by a theme attribute. e.g. android.R.attr.alertDialogIcon * * @param attrId ID of a theme attribute that points to a drawable resource. */ public void setIconAttribute(int attrId) { TypedValue out = new TypedValue(); mContext.getTheme().resolveAttribute(attrId, out, true); mAlert.setIcon(out.resourceId); } public void setInverseBackgroundForced(boolean forceInverseBackground) { mAlert.setInverseBackgroundForced(forceInverseBackground); } Loading Loading @@ -400,6 +411,18 @@ public class AlertDialog extends Dialog implements DialogInterface { return this; } /** * Set an icon as supplied by a theme attribute. e.g. android.R.attr.alertDialogIcon * * @param attrId ID of a theme attribute that points to a drawable resource. */ public Builder setIconAttribute(int attrId) { TypedValue out = new TypedValue(); P.mContext.getTheme().resolveAttribute(attrId, out, true); P.mIconId = out.resourceId; return this; } /** * Set a listener to be invoked when the positive button of the dialog is pressed. * @param textId The resource id of the text to display in the positive button Loading
core/java/com/android/internal/app/HeavyWeightSwitcherActivity.java +4 −1 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; import android.os.RemoteException; import android.util.Log; import android.util.TypedValue; import android.view.View; import android.view.Window; import android.view.View.OnClickListener; Loading Loading @@ -84,8 +85,10 @@ public class HeavyWeightSwitcherActivity extends Activity { button = findViewById((R.id.cancel)); button.setOnClickListener(mCancelListener); TypedValue out = new TypedValue(); getTheme().resolveAttribute(android.R.attr.alertDialogIcon, out, true); getWindow().setFeatureDrawableResource(Window.FEATURE_LEFT_ICON, android.R.drawable.ic_dialog_alert); out.resourceId); } void setText(int id, CharSequence text) { Loading
core/java/com/android/internal/app/ShutdownThread.java +1 −1 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public final class ShutdownThread extends Thread { if (confirm) { final CloseDialogReceiver closer = new CloseDialogReceiver(context); final AlertDialog dialog = new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic_dialog_alert) .setIconAttribute(android.R.attr.alertDialogIcon) .setTitle(com.android.internal.R.string.power_off) .setMessage(resourceId) .setPositiveButton(com.android.internal.R.string.yes, new DialogInterface.OnClickListener() { Loading