* You should have received a copy of the GNU General Public License
* along with Privacy Browser. If not, see <http://www.gnu.org/licenses/>.
*/
+
package com.stoutner.privacybrowser.dialogs
import android.annotation.SuppressLint
import android.app.Dialog
import android.content.Context
import android.content.DialogInterface
-import android.content.res.Configuration
+
import android.os.Bundle
import android.view.KeyEvent
import android.view.View
// Use a builder to create the alert dialog.
val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
- // Get the current theme status.
- val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
// Set the icon according to the theme.
- if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
- dialogBuilder.setIcon(R.drawable.font_size_day)
- } else {
- dialogBuilder.setIcon(R.drawable.font_size_night)
- }
+ dialogBuilder.setIconAttribute(R.attr.fontSizeBlueIcon)
// Set the title.
dialogBuilder.setTitle(R.string.font_size)