我设置了这一行
CheckBoxPreference android title Use full screen android key fullScreen
我在哪里放置此代码以获得全屏模式并隐藏状态栏并重新编译它?
我在哪里放这段代码
SharedPreferences sharedPref
PreferenceManager getDefaultSharedPreferences
fullscreen sharedPref getBoolean fullscreen false
if fullscreen getWindow.setFlags WindowManager LayoutParams FLAG_FULLSCREEN,
WindowManager LayoutParams FLAG_FULLSCREEN else getWindow setFlags
WindowManager LayoutParams FLAG_FULLSCREEN
答案 0 :(得分:1)
:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
这应该够了
编辑:
在你的清单中,就是这个片段:
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"