diff options
Diffstat (limited to 'app/src/main/java/fr/gouv/etalab/mastodon/activities/OwnerStatusActivity.java')
-rw-r--r-- | app/src/main/java/fr/gouv/etalab/mastodon/activities/OwnerStatusActivity.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/activities/OwnerStatusActivity.java b/app/src/main/java/fr/gouv/etalab/mastodon/activities/OwnerStatusActivity.java index de513a78c..f59b7ba49 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/activities/OwnerStatusActivity.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/activities/OwnerStatusActivity.java @@ -75,6 +75,7 @@ import fr.gouv.etalab.mastodon.sqlite.Sqlite; import fr.gouv.etalab.mastodon.sqlite.StatusCacheDAO; import static fr.gouv.etalab.mastodon.helper.Helper.THEME_BLACK; +import static fr.gouv.etalab.mastodon.helper.Helper.THEME_LIGHT; /** @@ -150,6 +151,9 @@ public class OwnerStatusActivity extends BaseActivity implements OnRetrieveFeeds }); TextView toolbarTitle = actionBar.getCustomView().findViewById(R.id.toolbar_title); pp_actionBar = actionBar.getCustomView().findViewById(R.id.pp_actionBar); + if (theme == THEME_LIGHT){ + Helper.colorizeToolbar(actionBar.getCustomView().findViewById(R.id.toolbar), R.color.black, OwnerStatusActivity.this); + } toolbarTitle.setText(getString(R.string.owner_cached_toots)); } statuses = new ArrayList<>(); @@ -262,6 +266,10 @@ public class OwnerStatusActivity extends BaseActivity implements OnRetrieveFeeds @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.option_owner_cache, menu); + SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE); + int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); + if( theme == THEME_LIGHT) + Helper.colorizeIconMenu(menu, R.color.black); return true; } @@ -301,7 +309,16 @@ public class OwnerStatusActivity extends BaseActivity implements OnRetrieveFeeds startService(backupIntent); return true; case R.id.action_filter: - AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(OwnerStatusActivity.this); + SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, android.content.Context.MODE_PRIVATE); + int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); + if (theme == Helper.THEME_DARK) { + style = R.style.DialogDark; + } else if (theme == Helper.THEME_BLACK){ + style = R.style.DialogBlack; + }else { + style = R.style.Dialog; + } + AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(OwnerStatusActivity.this, style); LayoutInflater inflater = this.getLayoutInflater(); @SuppressLint("InflateParams") View dialogView = inflater.inflate(R.layout.filter_owner_toots, null); dialogBuilder.setView(dialogView); |