Revert "Revert "Update dialog background color for dark theme""

This reverts commit 77259dc9bb.

Previously, using a general attribute to change the background color
for alert dialog. It will also impact on the background of other
components. To fix it, we used another attribute to change the dialog
background.

Bug: 132753127
Bug: 132623454
Bug: 129993336
Test: visual
Change-Id: I09091ee8fb45238d0ea94760f2fca5c206299a57
This commit is contained in:
Mill Chen
2019-05-16 17:43:06 +08:00
parent 77259dc9bb
commit 9862f8632a
5 changed files with 9 additions and 1 deletions

View File

@@ -22,6 +22,8 @@
<color name="homepage_card_dismissal_background">@*android:color/material_grey_900</color>
<color name="contextual_card_background">@*android:color/material_grey_900</color>
<color name="search_bar_background">@*android:color/material_grey_800</color>
<!-- Dialog background color -->
<color name="dialog_background">@*android:color/material_grey_800</color>
<color name="notification_importance_selection_bg">@*android:color/material_grey_800</color>
<color name="notification_importance_button_selected">#AECBFA</color> <!-- material blue 200 -->
<color name="notification_importance_button_unselected">#5F6368</color>

View File

@@ -33,6 +33,7 @@
<style name="Theme.AlertDialog.Base" parent="@style/Theme.AppCompat.DayNight.Dialog.Alert">
<item name="colorAccent">@*android:color/accent_device_default_dark</item>
<item name="android:colorBackground">@color/dialog_background</item>
</style>
</resources>

View File

@@ -144,4 +144,7 @@
<!-- Search bar background color -->
<color name="search_bar_background">@android:color/white</color>
<!-- Dialog background color -->
<color name="dialog_background">@*android:color/background_device_default_light</color>
</resources>

View File

@@ -121,6 +121,7 @@
<style name="Theme.AlertDialog.Base" parent="@style/Theme.AppCompat.DayNight.Dialog.Alert">
<item name="colorAccent">@*android:color/accent_device_default_light</item>
<item name="android:colorBackground">@color/dialog_background</item>
</style>
<style name="Theme.AlertDialog" parent="Theme.AlertDialog.Base">

View File

@@ -16,12 +16,13 @@
package com.android.settings.accessibility;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.settings.SettingsEnums;
import android.content.DialogInterface;
import android.os.Bundle;
import androidx.appcompat.app.AlertDialog;
import com.android.settings.R;
import com.android.settings.bluetooth.BluetoothPairingDetail;
import com.android.settings.core.SubSettingLauncher;