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;
moveToFolderListener = (MoveToFolderListener) context;
}
- // `@SuppressLint("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
// 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);
--- /dev/null
+<!-- This file is derived from elements of `folder` and `exit_to_app`, which are part of the Android Material icon set. They are released under the Apache License 2.0.
+ Modifications copyright © 2017 Soren Stoutner <soren@stoutner.com>. The resulting image is released under the GPLv3+ license. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster" >
+
+ <!-- A hard coded color must be used until API >= 21. Then `@color` or `?attr/colorControlNormal` may be used. -->
+ <path
+ android:fillColor="#FF1565C0"
+ android:pathData="M4,4C2.9,4 2.01,4.9 2.01,6L2,18C2,19.1 2.9,20 4,20L20,20C21.1,20 22,19.1 22,18L22,8C22,6.9 21.1,6 20,6L12,6L10,4L4,4zM13.75,7.83L18.75,12.83L13.75,17.83L12.34,16.421L14.92,13.83L5.25,13.83L5.25,11.83L14.92,11.83L12.34,9.24L13.75,7.83z" />
+</vector>
--- /dev/null
+<!-- This file is derived from elements of `folder` and `exit_to_app`, which are part of the Android Material icon set. They are released under the Apache License 2.0.
+ Modifications copyright © 2017 Soren Stoutner <soren@stoutner.com>. The resulting image is released under the GPLv3+ license. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="24"
+ android:viewportWidth="24"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster" >
+
+ <!-- A hard coded color must be used until API >= 21. Then `@color` or `?attr/colorControlNormal` may be used. -->
+ <path
+ android:fillColor="#FF8AB4F8"
+ android:pathData="M4,4C2.9,4 2.01,4.9 2.01,6L2,18C2,19.1 2.9,20 4,20L20,20C21.1,20 22,19.1 22,18L22,8C22,6.9 21.1,6 20,6L12,6L10,4L4,4zM13.75,7.83L18.75,12.83L13.75,17.83L12.34,16.421L14.92,13.83L5.25,13.83L5.25,11.83L14.92,11.83L12.34,9.24L13.75,7.83z" />
+</vector>