Loading api/current.xml +12 −0 Original line number Original line Diff line number Diff line Loading @@ -22877,6 +22877,18 @@ <parameter name="context" type="android.content.Context"> <parameter name="context" type="android.content.Context"> </parameter> </parameter> </constructor> </constructor> <constructor name="AlertDialog.Builder" type="android.app.AlertDialog.Builder" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="theme" type="int"> </parameter> </constructor> <method name="create" <method name="create" return="android.app.AlertDialog" return="android.app.AlertDialog" abstract="false" abstract="false" core/java/android/app/AlertDialog.java +11 −1 Original line number Original line Diff line number Diff line Loading @@ -265,12 +265,22 @@ public class AlertDialog extends Dialog implements DialogInterface { public static class Builder { public static class Builder { private final AlertController.AlertParams P; private final AlertController.AlertParams P; private int mTheme; /** /** * Constructor using a context for this builder and the {@link AlertDialog} it creates. * Constructor using a context for this builder and the {@link AlertDialog} it creates. */ */ public Builder(Context context) { public Builder(Context context) { this(context, com.android.internal.R.style.Theme_Dialog_Alert); } /** * Constructor using a context and theme for this builder and * the {@link AlertDialog} it creates. */ public Builder(Context context, int theme) { P = new AlertController.AlertParams(context); P = new AlertController.AlertParams(context); mTheme = theme; } } /** /** Loading Loading @@ -783,7 +793,7 @@ public class AlertDialog extends Dialog implements DialogInterface { * to do and want this to be created and displayed. * to do and want this to be created and displayed. */ */ public AlertDialog create() { public AlertDialog create() { final AlertDialog dialog = new AlertDialog(P.mContext); final AlertDialog dialog = new AlertDialog(P.mContext, mTheme); P.apply(dialog.mAlert); P.apply(dialog.mAlert); dialog.setCancelable(P.mCancelable); dialog.setCancelable(P.mCancelable); dialog.setOnCancelListener(P.mOnCancelListener); dialog.setOnCancelListener(P.mOnCancelListener); Loading Loading
api/current.xml +12 −0 Original line number Original line Diff line number Diff line Loading @@ -22877,6 +22877,18 @@ <parameter name="context" type="android.content.Context"> <parameter name="context" type="android.content.Context"> </parameter> </parameter> </constructor> </constructor> <constructor name="AlertDialog.Builder" type="android.app.AlertDialog.Builder" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="context" type="android.content.Context"> </parameter> <parameter name="theme" type="int"> </parameter> </constructor> <method name="create" <method name="create" return="android.app.AlertDialog" return="android.app.AlertDialog" abstract="false" abstract="false"
core/java/android/app/AlertDialog.java +11 −1 Original line number Original line Diff line number Diff line Loading @@ -265,12 +265,22 @@ public class AlertDialog extends Dialog implements DialogInterface { public static class Builder { public static class Builder { private final AlertController.AlertParams P; private final AlertController.AlertParams P; private int mTheme; /** /** * Constructor using a context for this builder and the {@link AlertDialog} it creates. * Constructor using a context for this builder and the {@link AlertDialog} it creates. */ */ public Builder(Context context) { public Builder(Context context) { this(context, com.android.internal.R.style.Theme_Dialog_Alert); } /** * Constructor using a context and theme for this builder and * the {@link AlertDialog} it creates. */ public Builder(Context context, int theme) { P = new AlertController.AlertParams(context); P = new AlertController.AlertParams(context); mTheme = theme; } } /** /** Loading Loading @@ -783,7 +793,7 @@ public class AlertDialog extends Dialog implements DialogInterface { * to do and want this to be created and displayed. * to do and want this to be created and displayed. */ */ public AlertDialog create() { public AlertDialog create() { final AlertDialog dialog = new AlertDialog(P.mContext); final AlertDialog dialog = new AlertDialog(P.mContext, mTheme); P.apply(dialog.mAlert); P.apply(dialog.mAlert); dialog.setCancelable(P.mCancelable); dialog.setCancelable(P.mCancelable); dialog.setOnCancelListener(P.mOnCancelListener); dialog.setOnCancelListener(P.mOnCancelListener); Loading