Change default theme to blue

pull/645/merge
Alex Baker 6 years ago
parent 7124dc7aa4
commit 3ad9062381

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 31 KiB

@ -7,10 +7,12 @@ import org.tasks.R;
import org.tasks.billing.PurchaseHelper;
import org.tasks.billing.PurchaseHelperCallback;
import org.tasks.dialogs.ColorPickerDialog;
import org.tasks.dialogs.ColorPickerDialog.ColorPalette;
import org.tasks.injection.ActivityComponent;
import org.tasks.injection.ThemedInjectingAppCompatActivity;
import org.tasks.themes.Theme;
import org.tasks.themes.ThemeCache;
import java.util.List;
import javax.inject.Inject;
@ -18,6 +20,8 @@ import static org.tasks.dialogs.ColorPickerDialog.newColorPickerDialog;
public class ColorPickerActivity extends ThemedInjectingAppCompatActivity implements ColorPickerDialog.ThemePickerCallback, PurchaseHelperCallback {
public enum ColorPalette {THEMES, COLORS, ACCENTS, WIDGET_BACKGROUND}
private static final String FRAG_TAG_COLOR_PICKER = "frag_tag_color_picker";
private static final int REQUEST_PURCHASE = 1006;
@ -27,6 +31,9 @@ public class ColorPickerActivity extends ThemedInjectingAppCompatActivity implem
@Inject PurchaseHelper purchaseHelper;
@Inject Theme theme;
@Inject ThemeCache themeCache;
private ColorPalette palette;
@Override
protected void onCreate(Bundle savedInstanceState) {
@ -38,25 +45,40 @@ public class ColorPickerActivity extends ThemedInjectingAppCompatActivity implem
super.onPostResume();
Intent intent = getIntent();
ColorPalette palette = (ColorPalette) intent.getSerializableExtra(EXTRA_PALETTE);
palette = (ColorPalette) intent.getSerializableExtra(EXTRA_PALETTE);
boolean showNone = intent.getBooleanExtra(EXTRA_SHOW_NONE, false);
int selected = intent.hasExtra(EXTRA_THEME_INDEX)
? intent.getIntExtra(EXTRA_THEME_INDEX, -1)
: getCurrentSelection(palette);
newColorPickerDialog(palette, showNone, selected)
newColorPickerDialog(getItems(palette), showNone, selected)
.show(getSupportFragmentManager(), FRAG_TAG_COLOR_PICKER);
}
private List<? extends ColorPickerDialog.Pickable> getItems(ColorPalette palette) {
switch (palette) {
case ACCENTS:
return themeCache.getAccents();
case COLORS:
return themeCache.getColors();
case THEMES:
return themeCache.getThemes();
case WIDGET_BACKGROUND:
return themeCache.getWidgetThemes();
default:
throw new RuntimeException("Un");
}
}
@Override
public void inject(ActivityComponent component) {
component.inject(this);
}
@Override
public void themePicked(final ColorPalette palette, final int index) {
public void themePicked(ColorPickerDialog.Pickable picked) {
Intent data = new Intent();
data.putExtra(EXTRA_PALETTE, palette);
data.putExtra(EXTRA_THEME_INDEX, index);
data.putExtra(EXTRA_THEME_INDEX, picked.getIndex());
setResult(RESULT_OK, data);
finish();
}

@ -142,7 +142,7 @@ public class GoogleTaskListSettingsActivity extends ThemedInjectingAppCompatActi
@OnClick(R.id.color)
protected void showThemePicker() {
Intent intent = new Intent(GoogleTaskListSettingsActivity.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_THEME_INDEX, selectedTheme);
intent.putExtra(ColorPickerActivity.EXTRA_SHOW_NONE, true);
startActivityForResult(intent, REQUEST_COLOR_PICKER);

@ -18,8 +18,6 @@ import android.view.inputmethod.InputMethodManager;
import com.todoroo.astrid.activity.TaskListActivity;
import com.todoroo.astrid.api.TagFilter;
import org.tasks.data.TagDataDao;
import org.tasks.data.TagData;
import com.todoroo.astrid.helper.UUIDHelper;
import com.todoroo.astrid.tags.TagService;
@ -27,7 +25,8 @@ import org.tasks.R;
import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.data.TagDao;
import org.tasks.dialogs.ColorPickerDialog;
import org.tasks.data.TagData;
import org.tasks.data.TagDataDao;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.injection.ActivityComponent;
import org.tasks.injection.ThemedInjectingAppCompatActivity;
@ -151,7 +150,7 @@ public class TagSettingsActivity extends ThemedInjectingAppCompatActivity implem
@OnClick(R.id.color)
protected void showThemePicker() {
Intent intent = new Intent(TagSettingsActivity.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_THEME_INDEX, selectedTheme);
intent.putExtra(ColorPickerActivity.EXTRA_SHOW_NONE, true);
startActivityForResult(intent, REQUEST_COLOR_PICKER);

@ -26,7 +26,6 @@ import org.tasks.analytics.Tracker;
import org.tasks.analytics.Tracking;
import org.tasks.data.CaldavAccount;
import org.tasks.data.CaldavDao;
import org.tasks.dialogs.ColorPickerDialog;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.injection.ActivityComponent;
import org.tasks.injection.ThemedInjectingAppCompatActivity;
@ -193,7 +192,7 @@ public class CalDAVSettingsActivity extends ThemedInjectingAppCompatActivity
@OnClick(R.id.color)
protected void showThemePicker() {
Intent intent = new Intent(CalDAVSettingsActivity.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_SHOW_NONE, true);
startActivityForResult(intent, REQUEST_COLOR_PICKER);
}

@ -5,6 +5,7 @@ import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Parcelable;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
@ -14,34 +15,43 @@ import org.tasks.injection.ForActivity;
import org.tasks.injection.InjectingDialogFragment;
import org.tasks.preferences.Preferences;
import org.tasks.themes.Theme;
import org.tasks.themes.ThemeCache;
import org.tasks.ui.SingleCheckedArrayAdapter;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
import static com.google.common.collect.Lists.transform;
public class ColorPickerDialog extends InjectingDialogFragment {
private static final String EXTRA_PALETTE = "extra_palette";
private static final String EXTRA_ITEMS = "extra_items";
private static final String EXTRA_SELECTED = "extra_selected";
private static final String EXTRA_SHOW_NONE = "extra_show_none";
public enum ColorPalette {THEMES, COLORS, ACCENTS, WIDGET_BACKGROUND}
public interface Pickable extends Parcelable {
String getName();
int getPickerColor();
boolean isFree();
int getIndex();
}
public interface ThemePickerCallback {
void themePicked(ColorPalette palette, int index);
void themePicked(Pickable pickable);
void initiateThemePurchase();
void dismissed();
}
public static ColorPickerDialog newColorPickerDialog(ColorPalette palette, boolean showNone, int selection) {
public static ColorPickerDialog newColorPickerDialog(List<? extends Pickable> items, boolean showNone, int selection) {
ColorPickerDialog dialog = new ColorPickerDialog();
Bundle args = new Bundle();
args.putSerializable(EXTRA_PALETTE, palette);
args.putParcelableArrayList(EXTRA_ITEMS, new ArrayList<Pickable>(items));
args.putInt(EXTRA_SELECTED, selection);
args.putBoolean(EXTRA_SHOW_NONE, showNone);
dialog.setArguments(args);
@ -51,10 +61,8 @@ public class ColorPickerDialog extends InjectingDialogFragment {
@Inject DialogBuilder dialogBuilder;
@Inject @ForActivity Context context;
@Inject Preferences preferences;
@Inject ThemeCache themeCache;
@Inject Theme theme;
private ColorPalette palette;
private ThemePickerCallback callback;
private SingleCheckedArrayAdapter adapter;
private Dialog dialog;
@ -64,37 +72,36 @@ public class ColorPickerDialog extends InjectingDialogFragment {
super.onCreate(savedInstanceState);
setRetainInstance(true);
Bundle arguments = getArguments();
palette = (ColorPalette) arguments.getSerializable(EXTRA_PALETTE);
final List<Pickable> items = arguments.getParcelableArrayList(EXTRA_ITEMS);
boolean showNone = arguments.getBoolean(EXTRA_SHOW_NONE);
int selected = arguments.getInt(EXTRA_SELECTED, -1);
final List<String> themes = Arrays.asList(context.getResources().getStringArray(getNameRes()));
adapter = new SingleCheckedArrayAdapter(context, themes, theme.getThemeAccent()) {
adapter = new SingleCheckedArrayAdapter(context, transform(items, Pickable::getName), theme.getThemeAccent()) {
@Override
protected int getDrawable(int position) {
return preferences.hasPurchase(R.string.p_purchased_themes) || position < getNumFree()
return preferences.hasPurchase(R.string.p_purchased_themes) || items.get(position).isFree()
? R.drawable.ic_lens_black_24dp
: R.drawable.ic_vpn_key_black_24dp;
}
@Override
protected int getDrawableColor(int position) {
return getDisplayColor(position);
return items.get(position).getPickerColor();
}
};
AlertDialogBuilder builder = dialogBuilder.newDialog(theme)
.setSingleChoiceItems(adapter, selected, (dialog, which) -> {
if (preferences.hasPurchase(R.string.p_purchased_themes) || which < getNumFree()) {
callback.themePicked(palette, which);
Pickable picked = items.get(which);
if (preferences.hasPurchase(R.string.p_purchased_themes) || picked.isFree()) {
callback.themePicked(picked);
} else {
callback.initiateThemePurchase();
}
})
.setOnDismissListener(dialogInterface -> callback.dismissed());
if (showNone) {
builder.setNeutralButton(R.string.none, (dialogInterface, i) -> callback.themePicked(palette, -1));
builder.setNeutralButton(R.string.none, (dialogInterface, i) -> callback.themePicked(null));
}
dialog = builder.create();
}
@ -128,34 +135,4 @@ public class ColorPickerDialog extends InjectingDialogFragment {
protected void inject(DialogFragmentComponent component) {
component.inject(this);
}
private int getNameRes() {
switch (palette) {
case COLORS:
return R.array.colors;
case ACCENTS:
return R.array.accents;
case WIDGET_BACKGROUND:
return R.array.widget_background;
default:
return R.array.themes;
}
}
private int getDisplayColor(int index) {
switch (palette) {
case COLORS:
return themeCache.getThemeColor(index).getPrimaryColor();
case ACCENTS:
return themeCache.getThemeAccent(index).getAccentColor();
case WIDGET_BACKGROUND:
return themeCache.getWidgetTheme(index).getBackgroundColor();
default:
return themeCache.getThemeBase(index).getContentBackground();
}
}
private int getNumFree() {
return 2;
}
}

@ -1,7 +1,5 @@
package org.tasks.injection;
import android.arch.lifecycle.ViewModel;
import com.todoroo.astrid.activity.BeastModePreferences;
import com.todoroo.astrid.activity.ShareLinkActivity;
import com.todoroo.astrid.activity.TaskListActivity;

@ -44,7 +44,7 @@ public class ActivityModule {
@Provides
@ActivityScope
public ThemeColor getThemeColor(ThemeCache themeCache, Preferences preferences) {
return themeCache.getThemeColor(preferences.getInt(R.string.p_theme_color, 0));
return themeCache.getThemeColor(preferences.getInt(R.string.p_theme_color, 7));
}
@Provides

@ -88,7 +88,7 @@ public class BasicPreferences extends InjectingPreferenceActivity implements
themePreference.setSummary(themeBase.getName());
themePreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(BasicPreferences.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.THEMES);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.THEMES);
startActivityForResult(intent, REQUEST_THEME_PICKER);
return false;
});
@ -96,7 +96,7 @@ public class BasicPreferences extends InjectingPreferenceActivity implements
colorPreference.setSummary(themeColor.getName());
colorPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(BasicPreferences.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.COLORS);
startActivityForResult(intent, REQUEST_COLOR_PICKER);
return false;
});
@ -104,7 +104,7 @@ public class BasicPreferences extends InjectingPreferenceActivity implements
accentPreference.setSummary(themeAccent.getName());
accentPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(BasicPreferences.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.ACCENTS);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.ACCENTS);
startActivityForResult(intent, REQUEST_ACCENT_PICKER);
return false;
});

@ -1,12 +1,14 @@
package org.tasks.themes;
import android.content.res.Resources;
import android.os.Parcel;
import org.tasks.R;
import org.tasks.dialogs.ColorPickerDialog;
public class ThemeAccent {
public class ThemeAccent implements ColorPickerDialog.Pickable {
public static final int[] ACCENTS = new int[] {
static final int[] ACCENTS = new int[] {
R.style.BlueGreyAccent,
R.style.RedAccent,
R.style.PinkAccent,
@ -38,19 +40,69 @@ public class ThemeAccent {
this.accentColor = accentColor;
}
private ThemeAccent(Parcel source) {
name = source.readString();
index = source.readInt();
style = source.readInt();
accentColor = source.readInt();
}
public void apply(Resources.Theme theme) {
theme.applyStyle(style, true);
}
@Override
public String getName() {
return name;
}
public int getAccentColor() {
@Override
public int getPickerColor() {
return accentColor;
}
@Override
public boolean isFree() {
switch (style) {
case R.style.BlueGreyAccent:
case R.style.RedAccent:
return true;
default:
return false;
}
}
@Override
public int getIndex() {
return index;
}
public int getAccentColor() {
return accentColor;
}
public static Creator<ThemeAccent> CREATOR = new Creator<ThemeAccent>() {
@Override
public ThemeAccent createFromParcel(Parcel source) {
return new ThemeAccent(source);
}
@Override
public ThemeAccent[] newArray(int size) {
return new ThemeAccent[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeInt(index);
dest.writeInt(style);
dest.writeInt(accentColor);
}
}

@ -3,12 +3,14 @@ package org.tasks.themes;
import android.app.Activity;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Parcel;
import android.support.v7.app.AppCompatDelegate;
import android.view.ContextThemeWrapper;
import org.tasks.R;
import org.tasks.dialogs.ColorPickerDialog;
public class ThemeBase {
public class ThemeBase implements ColorPickerDialog.Pickable {
private static final int[] THEMES = new int[]{
R.style.Tasks,
@ -32,18 +34,38 @@ public class ThemeBase {
this.contentBackground = contentBackground;
}
private ThemeBase(Parcel source) {
name = source.readString();
index = source.readInt();
style = source.readInt();
contentBackground = source.readInt();
dayNightMode = source.readInt();
}
public int getAlertDialogStyle() {
return R.style.TasksDialogAlert;
}
@Override
public String getName() {
return name;
}
public int getContentBackground() {
@Override
public int getPickerColor() {
return contentBackground;
}
@Override
public boolean isFree() {
return index < 2;
}
@Override
public int getIndex() {
return index;
}
public boolean isDarkTheme(Activity activity) {
return index == 4
? Configuration.UI_MODE_NIGHT_YES == (activity.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK)
@ -62,7 +84,29 @@ public class ThemeBase {
AppCompatDelegate.setDefaultNightMode(dayNightMode);
}
public int getIndex() {
return index;
public static Creator<ThemeBase> CREATOR = new Creator<ThemeBase>() {
@Override
public ThemeBase createFromParcel(Parcel source) {
return new ThemeBase(source);
}
@Override
public ThemeBase[] newArray(int size) {
return new ThemeBase[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeInt(index);
dest.writeInt(style);
dest.writeInt(contentBackground);
dest.writeInt(dayNightMode);
}
}

@ -16,6 +16,7 @@ import java.util.List;
import javax.inject.Inject;
import static android.support.v4.content.ContextCompat.getColor;
import static com.google.common.collect.ImmutableList.copyOf;
@ApplicationScope
public class ThemeCache {
@ -59,6 +60,7 @@ public class ThemeCache {
for (int i = 0; i < WidgetTheme.BACKGROUNDS.length ; i++) {
widgetThemes.add(new WidgetTheme(
widgetBackgroundNames[i],
i,
getColor(context, WidgetTheme.BACKGROUNDS[i]),
getColor(context, i == 0 ? R.color.black_87 : R.color.white_100),
getColor(context, i == 0 ? R.color.black_54 : R.color.white_70)));
@ -97,4 +99,20 @@ public class ThemeCache {
theme.resolveAttribute(attribute, typedValue, false);
return typedValue.data != 0;
}
public List<ThemeAccent> getAccents() {
return copyOf(accents);
}
public List<ThemeBase> getThemes() {
return copyOf(themes);
}
public List<ThemeColor> getColors() {
return copyOf(colors);
}
public List<WidgetTheme> getWidgetThemes() {
return copyOf(widgetThemes);
}
}

@ -6,17 +6,19 @@ import android.app.Activity;
import android.app.ActivityManager;
import android.content.res.Resources;
import android.os.Build;
import android.os.Parcel;
import android.support.v4.widget.DrawerLayout;
import android.support.v7.widget.Toolbar;
import android.view.View;
import org.tasks.R;
import org.tasks.dialogs.ColorPickerDialog;
import org.tasks.ui.MenuColorizer;
import static com.todoroo.andlib.utility.AndroidUtilities.atLeastLollipop;
import static com.todoroo.andlib.utility.AndroidUtilities.atLeastMarshmallow;
public class ThemeColor {
public class ThemeColor implements ColorPickerDialog.Pickable {
static final int[] COLORS = new int[] {
R.style.BlueGrey,
@ -59,6 +61,16 @@ public class ThemeColor {
this.isDark = isDark;
}
private ThemeColor(Parcel source) {
name = source.readString();
index = source.readInt();
actionBarTint = source.readInt();
style = source.readInt();
colorPrimary = source.readInt();
colorPrimaryDark = source.readInt();
isDark = source.readInt() == 1;
}
@SuppressLint("NewApi")
public void applyToStatusBar(Activity activity) {
setStatusBarColor(activity);
@ -106,10 +118,33 @@ public class ThemeColor {
}
}
@Override
public String getName() {
return name;
}
@Override
public int getPickerColor() {
return colorPrimary;
}
@Override
public boolean isFree() {
switch (style) {
case R.style.Blue:
case R.style.BlueGrey:
case R.style.DarkGrey:
return true;
default:
return false;
}
}
@Override
public int getIndex() {
return index;
}
public int getPrimaryColor() {
return colorPrimary;
}
@ -127,7 +162,31 @@ public class ThemeColor {
MenuColorizer.colorToolbar(toolbar, actionBarTint);
}
public int getIndex() {
return index;
public static Creator<ThemeColor> CREATOR = new Creator<ThemeColor>() {
@Override
public ThemeColor createFromParcel(Parcel source) {
return new ThemeColor(source);
}
@Override
public ThemeColor[] newArray(int size) {
return new ThemeColor[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeInt(index);
dest.writeInt(actionBarTint);
dest.writeInt(style);
dest.writeInt(colorPrimary);
dest.writeInt(colorPrimaryDark);
dest.writeInt(isDark ? 1 : 0);
}
}

@ -1,25 +1,40 @@
package org.tasks.themes;
import android.os.Parcel;
import org.tasks.R;
import org.tasks.dialogs.ColorPickerDialog;
public class WidgetTheme implements ColorPickerDialog.Pickable {
public class WidgetTheme {
public static final int[] BACKGROUNDS = new int[] {
static final int[] BACKGROUNDS = new int[] {
R.color.grey_50,
R.color.widget_background_black,
R.color.md_background_dark
};
private final String name;
private final int index;
private final int backgroundColor;
private final int textColorPrimary;
private final int textColorSecondary;
public WidgetTheme(String name, int backgroundColor, int textColorPrimary, int textColorSecondary) {
public WidgetTheme(String name, int index, int backgroundColor, int textColorPrimary, int textColorSecondary) {
this.name = name;
this.index = index;
this.backgroundColor = backgroundColor;
this.textColorPrimary = textColorPrimary;
this.textColorSecondary = textColorSecondary;
}
private WidgetTheme(Parcel source) {
name = source.readString();
index = source.readInt();
backgroundColor = source.readInt();
textColorPrimary = source.readInt();
textColorSecondary = source.readInt();
}
public int getBackgroundColor() {
return backgroundColor;
}
@ -32,7 +47,49 @@ public class WidgetTheme {
return textColorSecondary;
}
@Override
public String getName() {
return name;
}
@Override
public int getPickerColor() {
return backgroundColor;
}
@Override
public boolean isFree() {
return index < 2;
}
@Override
public int getIndex() {
return index;
}
public static Creator<WidgetTheme> CREATOR = new Creator<WidgetTheme>() {
@Override
public WidgetTheme createFromParcel(Parcel source) {
return new WidgetTheme(source);
}
@Override
public WidgetTheme[] newArray(int size) {
return new WidgetTheme[size];
}
};
@Override
public int describeContents() {
return 0;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
dest.writeInt(index);
dest.writeInt(backgroundColor);
dest.writeInt(textColorPrimary);
dest.writeInt(textColorSecondary);
}
}

@ -13,7 +13,6 @@ import org.tasks.R;
import org.tasks.activities.ColorPickerActivity;
import org.tasks.activities.FilterSelectionActivity;
import org.tasks.analytics.Tracker;
import org.tasks.dialogs.ColorPickerDialog;
import org.tasks.dialogs.DialogBuilder;
import org.tasks.dialogs.SeekBarDialog;
import org.tasks.injection.ActivityComponent;
@ -85,7 +84,7 @@ public class WidgetConfigActivity extends InjectingPreferenceActivity implements
findPreference(R.string.p_widget_theme).setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(WidgetConfigActivity.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.WIDGET_BACKGROUND);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.WIDGET_BACKGROUND);
intent.putExtra(ColorPickerActivity.EXTRA_THEME_INDEX, widgetPreferences.getThemeIndex());
startActivityForResult(intent, REQUEST_THEME_SELECTION);
return false;
@ -95,7 +94,7 @@ public class WidgetConfigActivity extends InjectingPreferenceActivity implements
colorPreference.setDependency(showHeader.getKey());
colorPreference.setOnPreferenceClickListener(preference -> {
Intent intent = new Intent(WidgetConfigActivity.this, ColorPickerActivity.class);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerDialog.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_PALETTE, ColorPickerActivity.ColorPalette.COLORS);
intent.putExtra(ColorPickerActivity.EXTRA_THEME_INDEX, widgetPreferences.getColorIndex());
startActivityForResult(intent, REQUEST_COLOR_SELECTION);
return false;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 599 B

After

Width:  |  Height:  |  Size: 498 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#607D8B</color>
<color name="ic_launcher_background">#2196F3</color>
</resources>
Loading…
Cancel
Save