diff options
author | stom79 <tschneider.ac@gmail.com> | 2018-11-03 14:45:55 +0100 |
---|---|---|
committer | stom79 <tschneider.ac@gmail.com> | 2018-11-03 14:45:55 +0100 |
commit | 713d12dfa934dcab989b1b564904163a66f0dbca (patch) | |
tree | ba124996cb738d7e86928814720c1fd26a5f8991 /app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java | |
parent | 47ae159a41cc78d2a068330a5a9304093337dc9a (diff) |
Improve alert dialog colors - #546
Diffstat (limited to 'app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java')
-rw-r--r-- | app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java index f25e893e8..5a0a84351 100644 --- a/app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java +++ b/app/src/main/java/fr/gouv/etalab/mastodon/drawers/DomainsListAdapter.java @@ -82,7 +82,17 @@ public class DomainsListAdapter extends RecyclerView.Adapter implements OnRetrie holder.domain_delete.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - AlertDialog.Builder builder = new AlertDialog.Builder(context); + SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE); + int theme = sharedpreferences.getInt(Helper.SET_THEME, Helper.THEME_DARK); + int style; + 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 builder = new AlertDialog.Builder(context, style); builder.setMessage(context.getString(R.string.unblock_domain_confirm_message, domain)); builder.setIcon(android.R.drawable.ic_dialog_alert) .setTitle(R.string.unblock_domain_confirm) |