|
|
@ -60,6 +60,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|
|
|
private ViewButtonColor btnColor;
|
|
|
|
private ViewButtonColor btnColor;
|
|
|
|
private Spinner spFontSize;
|
|
|
|
private Spinner spFontSize;
|
|
|
|
private Spinner spPadding;
|
|
|
|
private Spinner spPadding;
|
|
|
|
|
|
|
|
private CheckBox cbCompose;
|
|
|
|
private Button btnSave;
|
|
|
|
private Button btnSave;
|
|
|
|
private ContentLoadingProgressBar pbWait;
|
|
|
|
private ContentLoadingProgressBar pbWait;
|
|
|
|
private Group grpReady;
|
|
|
|
private Group grpReady;
|
|
|
@ -91,6 +92,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|
|
|
int background = prefs.getInt("widget." + appWidgetId + ".background", Color.TRANSPARENT);
|
|
|
|
int background = prefs.getInt("widget." + appWidgetId + ".background", Color.TRANSPARENT);
|
|
|
|
int font = prefs.getInt("widget." + appWidgetId + ".font", 0);
|
|
|
|
int font = prefs.getInt("widget." + appWidgetId + ".font", 0);
|
|
|
|
int padding = prefs.getInt("widget." + appWidgetId + ".padding", 0);
|
|
|
|
int padding = prefs.getInt("widget." + appWidgetId + ".padding", 0);
|
|
|
|
|
|
|
|
boolean compose = prefs.getBoolean("widget." + appWidgetId + ".compose", false);
|
|
|
|
|
|
|
|
|
|
|
|
getSupportActionBar().setSubtitle(R.string.title_widget_title_list);
|
|
|
|
getSupportActionBar().setSubtitle(R.string.title_widget_title_list);
|
|
|
|
setContentView(R.layout.activity_widget_unified);
|
|
|
|
setContentView(R.layout.activity_widget_unified);
|
|
|
@ -103,6 +105,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|
|
|
btnColor = findViewById(R.id.btnColor);
|
|
|
|
btnColor = findViewById(R.id.btnColor);
|
|
|
|
spFontSize = findViewById(R.id.spFontSize);
|
|
|
|
spFontSize = findViewById(R.id.spFontSize);
|
|
|
|
spPadding = findViewById(R.id.spPadding);
|
|
|
|
spPadding = findViewById(R.id.spPadding);
|
|
|
|
|
|
|
|
cbCompose = findViewById(R.id.cbCompose);
|
|
|
|
btnSave = findViewById(R.id.btnSave);
|
|
|
|
btnSave = findViewById(R.id.btnSave);
|
|
|
|
pbWait = findViewById(R.id.pbWait);
|
|
|
|
pbWait = findViewById(R.id.pbWait);
|
|
|
|
grpReady = findViewById(R.id.grpReady);
|
|
|
|
grpReady = findViewById(R.id.grpReady);
|
|
|
@ -170,6 +173,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|
|
|
editor.putInt("widget." + appWidgetId + ".background", btnColor.getColor());
|
|
|
|
editor.putInt("widget." + appWidgetId + ".background", btnColor.getColor());
|
|
|
|
editor.putInt("widget." + appWidgetId + ".font", tinyOut(font));
|
|
|
|
editor.putInt("widget." + appWidgetId + ".font", tinyOut(font));
|
|
|
|
editor.putInt("widget." + appWidgetId + ".padding", tinyOut(padding));
|
|
|
|
editor.putInt("widget." + appWidgetId + ".padding", tinyOut(padding));
|
|
|
|
|
|
|
|
editor.putBoolean("widget." + appWidgetId + ".compose", cbCompose.isChecked());
|
|
|
|
editor.putInt("widget." + appWidgetId + ".version", BuildConfig.VERSION_CODE);
|
|
|
|
editor.putInt("widget." + appWidgetId + ".version", BuildConfig.VERSION_CODE);
|
|
|
|
|
|
|
|
|
|
|
|
editor.apply();
|
|
|
|
editor.apply();
|
|
|
@ -287,6 +291,7 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|
|
|
btnColor.setColor(background);
|
|
|
|
btnColor.setColor(background);
|
|
|
|
spFontSize.setSelection(tinyIn(font));
|
|
|
|
spFontSize.setSelection(tinyIn(font));
|
|
|
|
spPadding.setSelection(tinyIn(padding));
|
|
|
|
spPadding.setSelection(tinyIn(padding));
|
|
|
|
|
|
|
|
cbCompose.setChecked(compose);
|
|
|
|
|
|
|
|
|
|
|
|
grpReady.setVisibility(View.GONE);
|
|
|
|
grpReady.setVisibility(View.GONE);
|
|
|
|
pbWait.setVisibility(View.VISIBLE);
|
|
|
|
pbWait.setVisibility(View.VISIBLE);
|
|
|
|