全屏透明性(没有标题和放大器;状态栏)不工作....为什么? [英] Full screen transparent activity (no title & status bar) doesn't work.... why?
本文介绍了全屏透明性(没有标题和放大器;状态栏)不工作....为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在做一个自定义锁屏。
I'm making a custom lock screen.
在锁屏是我启动的时候一个活动的屏幕熄灭。
The lock screen is an activity which I launch by the time the screen goes off.
不过,我不能使活动既透明和放大器;全屏。
However, I can't make the activity be both transparent & fullscreen.
状态栏一直显示。
下面是我做的清单:
<activity android:name=".activities.LockScreenActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"/>
我也activit的onCreate添加这些额外的:
I'm also adding these extras in activit's onCreate:
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.lock_screen);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
但它似乎无法工作:|
But it can't seem to work :|
为什么?
推荐答案
删除的onCreate的code()。在Manifestfile使用。
delete the code from onCreate(). use this in Manifestfile.
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
否则,根据您的要求创建的主题。
otherwise create the theme according to your requirement.
这篇关于全屏透明性(没有标题和放大器;状态栏)不工作....为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文