File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1906719067<parameter name="context" type="android.content.Context">
1906819068</parameter>
1906919069</constructor>
19070+ <constructor name="AlertDialog.Builder"
19071+ type="android.app.AlertDialog.Builder"
19072+ static="false"
19073+ final="false"
19074+ deprecated="not deprecated"
19075+ visibility="public"
19076+ >
19077+ <parameter name="context" type="android.content.Context">
19078+ </parameter>
19079+ <parameter name="theme" type="int">
19080+ </parameter>
19081+ </constructor>
1907019082<method name="create"
1907119083 return="android.app.AlertDialog"
1907219084 abstract="false"
Original file line number Diff line number Diff line change @@ -265,12 +265,22 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {
265265
266266 public static class Builder {
267267 private final AlertController .AlertParams P ;
268+ private int mTheme ;
268269
269270 /**
270271 * Constructor using a context for this builder and the {@link AlertDialog} it creates.
271272 */
272273 public Builder (Context context ) {
274+ this (context , com .android .internal .R .style .Theme_Dialog_Alert );
275+ }
276+
277+ /**
278+ * Constructor using a context and theme for this builder and
279+ * the {@link AlertDialog} it creates.
280+ */
281+ public Builder (Context context , int theme ) {
273282 P = new AlertController .AlertParams (context );
283+ mTheme = theme ;
274284 }
275285
276286 /**
@@ -783,7 +793,7 @@ public Builder setRecycleOnMeasureEnabled(boolean enabled) {
783793 * to do and want this to be created and displayed.
784794 */
785795 public AlertDialog create () {
786- final AlertDialog dialog = new AlertDialog (P .mContext );
796+ final AlertDialog dialog = new AlertDialog (P .mContext , mTheme );
787797 P .apply (dialog .mAlert );
788798 dialog .setCancelable (P .mCancelable );
789799 dialog .setOnCancelListener (P .mOnCancelListener );
You can’t perform that action at this time.
0 commit comments