Fix theme of BrightnessDialog
Parent inheritance overrides dot inheritance. In order to have a dialog theme but also get QS colors, apply the theme (as fallback) for the dialog. Test: manual, open dialog from Settings Fixes: 289187620 Change-Id: Idf36d91005a50b95e502e8a208daf254aeaf4fb8
This commit is contained in:
@@ -865,7 +865,7 @@
|
||||
<activity
|
||||
android:name=".settings.brightness.BrightnessDialog"
|
||||
android:label="@string/quick_settings_brightness_dialog_title"
|
||||
android:theme="@style/Theme.SystemUI.QuickSettings.BrightnessDialog"
|
||||
android:theme="@style/BrightnessDialog"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:launchMode="singleInstance"
|
||||
android:excludeFromRecents="true"
|
||||
|
||||
@@ -398,7 +398,8 @@
|
||||
<item name="android:itemTextAppearance">@style/Control.MenuItem</item>
|
||||
</style>
|
||||
|
||||
<style name="Theme.SystemUI.QuickSettings.BrightnessDialog" parent="@android:style/Theme.DeviceDefault.Dialog">
|
||||
<!-- Cannot double inherit. Use Theme.SystemUI.QuickSettings in code to match -->
|
||||
<style name="BrightnessDialog" parent="@android:style/Theme.DeviceDefault.Dialog">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
</style>
|
||||
|
||||
|
||||
@@ -84,6 +84,7 @@ public class BrightnessDialog extends Activity {
|
||||
window.getDecorView();
|
||||
window.setLayout(
|
||||
WindowManager.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT);
|
||||
getTheme().applyStyle(R.style.Theme_SystemUI_QuickSettings, false);
|
||||
|
||||
setContentView(R.layout.brightness_mirror_container);
|
||||
FrameLayout frame = findViewById(R.id.brightness_mirror_container);
|
||||
|
||||
Reference in New Issue
Block a user