From 9fc8e8e4e46c55cf7d6ce5e92b30592b6dadb4ea Mon Sep 17 00:00:00 2001 From: tom79 Date: Sun, 9 Jun 2019 10:48:18 +0200 Subject: [PATCH] Fix confirmation popup issue with light theme. --- .../android/activities/PhotoEditorActivity.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/activities/PhotoEditorActivity.java b/app/src/main/java/app/fedilab/android/activities/PhotoEditorActivity.java index 70005c800..998b97831 100644 --- a/app/src/main/java/app/fedilab/android/activities/PhotoEditorActivity.java +++ b/app/src/main/java/app/fedilab/android/activities/PhotoEditorActivity.java @@ -404,7 +404,17 @@ public class PhotoEditorActivity extends BaseActivity implements OnPhotoEditorL } private void showSaveDialog() { - AlertDialog.Builder builder = new AlertDialog.Builder(this); + int style; + SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, 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 builder = new AlertDialog.Builder(this, style); builder.setMessage( getString(R.string.confirm_exit_editing)); builder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() { @Override