全屏
方法一:配置文件 ?android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
詳情:
?<activity android:name=".GameActivity"
? ? ? ? ? ? ? ? ? android:label="@string/app_name"
? ? ? ? ? ? ? ? ? android:configChanges="keyboardHidden|orientation"?
? ? ? ? ? ? ? ? ? android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
? ? ? ? ? ? ? ? ? android:screenOrientation="landscape"
? ? ? ? ? ? ? ? ?>
? ? ?</activity>
方法二:代碼
public class test extneds Activity{
pubilc void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);//無title
getWindow().setFlags(WindowManager.LayoutParams,FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.main);
}
}
總結
- 上一篇: UNIX学习笔记(七) 后台执行命令3
- 下一篇: 添加翻转功能的list类