Use dark dialog for base theme picker

pull/437/head
Alex Baker 8 years ago
parent eb5bb04773
commit 98497e118f

@ -24,6 +24,10 @@ public class DialogBuilder {
}
public AlertDialogBuilder newDialog() {
return newDialog(theme);
}
public AlertDialogBuilder newDialog(Theme theme) {
return new AlertDialogBuilder(activity, theme, locale);
}

@ -64,6 +64,10 @@ public class ThemePickerDialog extends InjectingDialogFragment {
palette = (ColorPalette) savedInstanceState.getSerializable(EXTRA_COLOR_PALETTE);
}
if (palette == ColorPalette.THEMES) {
theme = theme.withBaseTheme(themeCache.getThemeBase(2));
}
final String[] themes = getResources().getStringArray(getNameRes());
final boolean purchasedThemes = preferences.hasPurchase(R.string.p_purchased_themes);
@ -90,7 +94,7 @@ public class ThemePickerDialog extends InjectingDialogFragment {
}
};
return dialogBuilder.newDialog()
return dialogBuilder.newDialog(theme)
.setAdapter(adapter, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {

@ -23,6 +23,10 @@ public class Theme {
this.themeAccent = themeAccent;
}
public Theme withBaseTheme(ThemeBase themeBase) {
return new Theme(themeBase, themeColor, themeAccent);
}
public ThemeBase getThemeBase() {
return themeBase;
}

Loading…
Cancel
Save