Add white theme

pull/757/head
Alex Baker 6 years ago
parent 7d014eda4f
commit 766da5fc8c

@ -58,8 +58,9 @@ public class ColorPickerActivity extends ThemedInjectingAppCompatActivity
case ACCENTS:
return themeCache.getAccents();
case COLORS:
case LAUNCHER:
return themeCache.getColors();
case LAUNCHER:
return themeCache.getColors().subList(0, themeCache.getColors().size() - 1);
case THEMES:
return themeCache.getThemes();
case WIDGET_BACKGROUND:

@ -1,6 +1,8 @@
package org.tasks.dialogs;
import static androidx.core.content.ContextCompat.getColor;
import static com.google.common.collect.Lists.transform;
import static org.tasks.preferences.ResourceResolver.getData;
import android.app.Activity;
import android.app.Dialog;
@ -68,7 +70,8 @@ public class ColorPickerDialog extends InjectingDialogFragment {
@Override
protected int getDrawableColor(int position) {
return items.get(position).getPickerColor();
int pickerColor = items.get(position).getPickerColor();
return pickerColor == -1 ? getColor(context, R.color.grey_50) : pickerColor;
}
};

@ -21,8 +21,6 @@ import org.tasks.ui.MenuColorizer;
public class ThemeColor implements ColorPickerDialog.Pickable {
public static final int DEFAULT = 7;
public static final int[] ICONS =
new int[] {
R.mipmap.ic_launcher_blue_grey,
@ -92,7 +90,8 @@ public class ThemeColor implements ColorPickerDialog.Pickable {
R.style.Orange,
R.style.DeepOrange,
R.style.Brown,
R.style.Grey
R.style.Grey,
R.style.White
};
public static Creator<ThemeColor> CREATOR =

@ -81,6 +81,7 @@
<item>@string/theme_deep_orange</item>
<item>@string/theme_brown</item>
<item>@string/theme_grey</item>
<item>@string/theme_white</item>
</string-array>
<string-array name="accents">

@ -757,6 +757,7 @@ File %1$s contained %2$s.\n\n
<string name="theme_blue_grey">Blue grey</string>
<string name="theme_black">Black</string>
<string name="theme_dark_grey">Dark grey</string>
<string name="theme_white">White</string>
<string name="theme_light">Light</string>
<string name="theme_dark">Dark</string>
<string name="theme_wallpaper">Wallpaper</string>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="White" parent="BlackToolbarTheme">
<item name="colorPrimary">@color/white_100</item>
<item name="colorPrimaryDark">@color/white_100</item>
</style>
</resources>
Loading…
Cancel
Save