use the stored color at the widget configure screen as default

This commit is contained in:
tibbi 2016-01-31 17:09:05 +01:00
parent 7382ddab1c
commit 1050d9c0d2
1 changed files with 6 additions and 1 deletions

View File

@ -63,13 +63,18 @@ public class MyWidgetConfigure extends AppCompatActivity implements Calendar {
dayTextSize /= res.getDisplayMetrics().density;
todayTextSize /= res.getDisplayMetrics().density;
textColorWithoutTransparency = Color.WHITE;
final SharedPreferences prefs = initPrefs(this);
textColorWithoutTransparency = prefs.getInt(Constants.WIDGET_TEXT_COLOR, Color.WHITE);
updateTextColors();
calendar = new CalendarImpl(this);
calendar.updateCalendar(new DateTime());
}
private SharedPreferences initPrefs(Context context) {
return context.getSharedPreferences(Constants.PREFS, Context.MODE_PRIVATE);
}
@OnClick(R.id.config_save)
public void saveConfig() {
storeWidgetColors();