两种方法:
1: 为每一个application
在application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/notitle"
Value/style.xml
<style name="notitle">
<item name="android:windowNoTitle">true<item>
</style>
2: 为每一个activity设置
//设置为无标题
requestWindowFeature(Window.FEATURE_NO_TITLE);
//设置为全屏模式
getWindow().setFlag(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
3.获取屏幕大小
DisplayMetrics metrics = new DisplayMetrics();
MyCAAActivity.this.getWindowManager().getDefaultDisplay().getMetrics(metrics);
metrics.widthPixels 屏幕宽度
metrics.heightPixels屏幕高度
本文详细介绍了如何为Android应用设置无标题界面与全屏模式,并提供了获取屏幕大小的方法,帮助开发者实现更好的用户体验。
885

被折叠的 条评论
为什么被折叠?



