Android自定义锁定屏幕不能全屏

时间:2012-02-02 05:26:02

标签: android fullscreen

我正在制作一个自定义锁屏,
我想添加和选项隐藏状态栏(全屏)
但是,我已经尝试了以下代码(在我的锁屏活动中),它根本不起作用,
我的应用程序位于状态栏的“后面”...

getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                            WindowManager.LayoutParams.FLAG_FULLSCREEN);

<activity android:name=".lockscreenactivity" 
        android:label="@string/lock_screen"
        android:theme="@android:style/Theme.Wallpaper.NoTitleBar" 
        android:excludeFromRecents="true" 
        android:process=":LockScreen"
        android:clearTaskOnLaunch="true" 
        android:screenOrientation="portrait"
        android:launchMode="singleTask" 
        android:configChanges="orientation" />
谁知道为什么?
(以上代码适用于我的其他活动。)

1 个答案:

答案 0 :(得分:0)

纠正这个:

android:theme="@android:style/Theme.Wallpaper.NoTitleBar" 

 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
相关问题