Remove getThemedDialog and getAlertDialogStyle

pull/935/head
Alex Baker 4 years ago
parent 46ee03d9bd
commit 25e411528b

@ -67,7 +67,7 @@ public class TimeDurationControlSet implements OnNNumberPickedListener, View.OnC
if (dialog == null) { if (dialog == null) {
dialog = dialog =
new NNumberPickerDialog( new NNumberPickerDialog(
theme.getThemedDialog(context), context,
this, this,
context.getResources().getString(R.string.DLG_hour_minutes), context.getResources().getString(R.string.DLG_hour_minutes),
new int[] {0, 0}, new int[] {0, 0},

@ -4,7 +4,6 @@ import static com.todoroo.andlib.utility.AndroidUtilities.atLeastJellybeanMR1;
import android.content.Context; import android.content.Context;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.view.ContextThemeWrapper;
import android.view.View; import android.view.View;
import android.widget.ListAdapter; import android.widget.ListAdapter;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
@ -24,9 +23,7 @@ public class AlertDialogBuilder {
this.context = context; this.context = context;
this.theme = theme; this.theme = theme;
this.locale = locale; this.locale = locale;
ContextThemeWrapper wrapper = theme.getThemedDialog(context); builder = new MaterialAlertDialogBuilder(context);
theme.applyToContext(wrapper);
builder = new MaterialAlertDialogBuilder(wrapper);
} }
public AlertDialogBuilder setMessage(int message, Object... formatArgs) { public AlertDialogBuilder setMessage(int message, Object... formatArgs) {

@ -39,7 +39,7 @@ public class DialogBuilder {
ProgressDialog newProgressDialog() { ProgressDialog newProgressDialog() {
ProgressDialog progressDialog = ProgressDialog progressDialog =
new ProgressDialog(activity, theme.getThemeBase().getAlertDialogStyle()); new ProgressDialog(activity);
theme.applyToContext(progressDialog.getContext()); theme.applyToContext(progressDialog.getContext());
if (AndroidUtilities.preLollipop()) { if (AndroidUtilities.preLollipop()) {
ColorDrawable background = ColorDrawable background =

@ -42,10 +42,6 @@ public class Theme {
return (LayoutInflater) wrap(context).getSystemService(Context.LAYOUT_INFLATER_SERVICE); return (LayoutInflater) wrap(context).getSystemService(Context.LAYOUT_INFLATER_SERVICE);
} }
public ContextThemeWrapper getThemedDialog(Context context) {
return new ContextThemeWrapper(context, themeBase.getAlertDialogStyle());
}
public void applyThemeAndStatusBarColor(Activity activity) { public void applyThemeAndStatusBarColor(Activity activity) {
applyTheme(activity); applyTheme(activity);
themeColor.applyToSystemBars(activity); themeColor.applyToSystemBars(activity);

@ -50,10 +50,6 @@ public class ThemeBase implements ColorPickerDialog.Pickable {
dayNightMode = source.readInt(); dayNightMode = source.readInt();
} }
public int getAlertDialogStyle() {
return R.style.TasksDialogAlert;
}
@Override @Override
public String getName() { public String getName() {
return name; return name;

Loading…
Cancel
Save