android 全屏设置
来源:互联网 发布:此何遽不为福乎的意思 编辑:程序博客网 时间:2024/06/08 07:09
代码实现全屏函数
private
void
setFullScreen(){
2
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
3
}
退出全屏函数
private
void
quitFullScreen(){
2
final
WindowManager.LayoutParams attrs = getWindow().getAttributes();
3
attrs.flags &= (~WindowManager.LayoutParams.FLAG_FULLSCREEN);
4
getWindow().setAttributes(attrs);
5
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
6
}
在Manifest中设置全屏- <?xml version="1.0" encoding="utf-8"?>
- <manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.andyidea"
- android:versionCode="1"
- android:versionName="1.0">
- <uses-sdk android:minSdkVersion="8" />
- <application android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:name=".login.LoginActivity"
- android:theme="@android:style/android.NoTitleBar.Fullscreen"
- android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- </application>
- </manifest>
0 0
- Android全屏设置及取消全屏设置
- Android全屏设置及取消全屏设置
- Android全屏设置及取消全屏设置
- Android全屏设置及取消全屏设置
- Android Activity设置全屏
- android 程序全屏设置
- 【Android】Activity全屏设置
- Android全屏设置代码
- android设置全屏显示
- Android 全屏设置
- 设置Android程序全屏
- Android全屏设置
- android设置全屏显示
- android 动态设置全屏
- Android屏幕设置全屏
- Android横屏,全屏设置
- android全屏设置
- Android进行全屏设置
- linux下mysql的卸载、安装全过程
- 自己动手写操作系统——bochs启动问题
- 关于对html5播放实时视频流的预研
- strcpy、strcmp和memcpy 函数实现
- Phone应用提交流程:如何将App程序发布到App Store
- android 全屏设置
- static、final、static final 用法
- 2014面试总结--java、数据 方向
- openlayers 多边形重叠判断平移
- iis6.0的网站建设及权限设置
- poj3461
- 儿童卡通城堡banner动画
- ffmpeg 从内存中读取数据
- CursorLoader为ListFragment中ListView加载数据的流程