Android(安卓)设置APP全屏模式
16lz
2021-12-04
归纳为三种模式
1、AndroidManifest中配置
1;android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"2;android:theme="@android:style/Theme.NoTitleBar.Fullscreen"这两种方式都OK
2、代码中配置
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);//要在 setContentView() 方法之前调用哦requestWindowFeature(Window.FEATURE_NO_TITLE);getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(getLayoutId()); }
3、配置style文件
更多相关文章
- 应用界面主题Theme使用收集
- Android(安卓)TextView的跑马灯效果以及TextView的部分属性
- android:screenOrientation属性
- android ui界面设计参数讲解
- android:screenOrientation属性
- Android之布局属性归纳
- android > EditText 控件操作
- 常见Theme
- Android计算器开发实例