全屏
16lz
2021-12-04
方法一:配置文件 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);
}
}
更多相关文章
- Android(安卓)开源源代码收集(不断更新中...)
- Android(安卓)打开浏览器的几种方法
- android onTouch()与onTouchEvent()的区别
- Android(安卓)JNI介绍
- Unity调用安卓
- Gradle DSL method not found: 'android()
- 详解 Android(安卓)的 Activity 组件
- Android进程与线程基本知识
- Unity调用Android配置方法