由网友(别让梦想只是梦想。)分享简介:我在做一个自定义锁屏。I'm making a custom lock screen.在锁屏是我启动的时候一个活动的屏幕熄灭。The lock screen is an activity which I launch by the time the screen goes off.不过,我不能使活动既透明和放大...
我在做一个自定义锁屏。
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.
相关推荐
最新文章