mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 21:34:44 +02:00
Reconfigurable sync widget
This commit is contained in:
@@ -55,6 +55,10 @@ public class ActivityWidgetSync extends ActivityBase {
|
||||
appWidgetId = extras.getInt(
|
||||
AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
|
||||
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ActivityWidgetSync.this);
|
||||
boolean semi = prefs.getBoolean("widget." + appWidgetId + ".semi", true);
|
||||
int background = prefs.getInt("widget." + appWidgetId + ".background", Color.TRANSPARENT);
|
||||
|
||||
getSupportActionBar().setSubtitle(R.string.title_widget_title_sync);
|
||||
setContentView(R.layout.activity_widget_sync);
|
||||
|
||||
@@ -113,7 +117,9 @@ public class ActivityWidgetSync extends ActivityBase {
|
||||
}
|
||||
});
|
||||
|
||||
btnColor.setColor(Color.TRANSPARENT);
|
||||
// Initialize
|
||||
cbSemiTransparent.setChecked(semi);
|
||||
btnColor.setColor(background);
|
||||
|
||||
setResult(RESULT_CANCELED, resultValue);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user