X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FMoveToFolderDialog.java;h=a421177cabcf509250f6a3e4e440447a38654eb2;hp=2406e95af31d69582f8fe7606cbe1d9e543c88f8;hb=4ce562261f47e06c454504262a24f61f46bb393d;hpb=74655c0cd0ba72c80ac6c48df55bc3d2f5280ad2 diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.java b/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.java index 2406e95a..a421177c 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.java +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.java @@ -24,6 +24,7 @@ import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; +import android.content.res.Configuration; import android.database.Cursor; import android.database.DatabaseUtils; import android.database.MatrixCursor; @@ -74,7 +75,7 @@ public class MoveToFolderDialog extends DialogFragment { moveToFolderListener = (MoveToFolderListener) context; } - // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`. + // `@SuppressLint("InflateParams")` removes the warning about using `null` as the parent view group when inflating the alert dialog. @SuppressLint("InflateParams") @Override @NonNull @@ -85,6 +86,16 @@ public class MoveToFolderDialog extends DialogFragment { // Use an alert dialog builder to create the alert dialog. AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog); + // Get the current theme status. + int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK; + + // Set the icon according to the theme. + if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) { + dialogBuilder.setIcon(R.drawable.move_to_folder_blue_day); + } else { + dialogBuilder.setIcon(R.drawable.move_to_folder_blue_night); + } + // Set the title. dialogBuilder.setTitle(R.string.move_to_folder);