Merge "Fix theming on brightness dialog" into oc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3d82322c7c
@@ -2961,5 +2961,8 @@
|
||||
<java-symbol type="string" name="etws_primary_default_message_test" />
|
||||
|
||||
<java-symbol type="string" name="etws_primary_default_message_others" />
|
||||
|
||||
<java-symbol type="bool" name="config_quickSettingsSupported" />
|
||||
|
||||
<java-symbol type="style" name="Theme.DeviceDefault.QuickSettings" />
|
||||
</resources>
|
||||
|
||||
@@ -18,8 +18,11 @@ package com.android.systemui.settings;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.ContextThemeWrapper;
|
||||
import android.view.Gravity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageView;
|
||||
@@ -43,7 +46,13 @@ public class BrightnessDialog extends Activity {
|
||||
window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
|
||||
window.requestFeature(Window.FEATURE_NO_TITLE);
|
||||
|
||||
setContentView(R.layout.quick_settings_brightness_dialog);
|
||||
// Use a dialog theme as the activity theme, but inflate the content as
|
||||
// the QS content.
|
||||
ContextThemeWrapper themedContext = new ContextThemeWrapper(this,
|
||||
com.android.internal.R.style.Theme_DeviceDefault_QuickSettings);
|
||||
View v = LayoutInflater.from(themedContext).inflate(
|
||||
R.layout.quick_settings_brightness_dialog, null);
|
||||
setContentView(v);
|
||||
|
||||
final ImageView icon = (ImageView) findViewById(R.id.brightness_icon);
|
||||
final ToggleSliderView slider = (ToggleSliderView) findViewById(R.id.brightness_slider);
|
||||
|
||||
Reference in New Issue
Block a user