您好,我正在开发一个用于降低夜间屏幕亮度的应用程序。但是现在我面临一个问题,应用程序降低了屏幕亮度,但没有覆盖状态栏。任何想法怎么做
<style name="AppTheme" parent="@android:style/Theme.Translucent" />
<style name="Transparency" parent="AppTheme">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
<item name="android:windowFullscreen">true</item>
<item name="android:backgroundDimEnabled">false</item>
</style>
MainActivity.java
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
initialize();
}
private void initialize(){
stopServiceIfActive();
shared=new SharedMemory(this);
alphaSeek=(SeekBar)findViewById(R.id.alphaControl);
redSeek=(SeekBar)findViewById(R.id.redControl);
greenSeek=(SeekBar)findViewById(R.id.greenControl);
blueSeek=(SeekBar)findViewById(R.id.blueControl);
alphaSeek.setOnSeekBarChangeListener(this);
redSeek.setOnSeekBarChangeListener(this);
greenSeek.setOnSeekBarChangeListener(this);
blueSeek.setOnSeekBarChangeListener(this);
alpha=shared.getAlpha();
red=shared.getRed();
green=shared.getGreen();
blue=shared.getBlue();
alphaSeek.setProgress(alpha);
redSeek.setProgress(red);
greenSeek.setProgress(green);
blueSeek.setProgress(blue);
updateColor();
}
任何想法