android保持屏幕常亮
来源:互联网 发布:外包淘宝客服招聘 编辑:程序博客网 时间:2024/05/08 00:36
/* Window flag: as long as this window is visible to the user, keep the device’s screen turned on and bright. /
public static final int FLAG_KEEP_SCREEN_ON = 0x00000080;
WindowManager提供了FLAG_KEEP_SCREEN_ON,让开发者更方便实现屏幕常亮。
用法也很简单:
让屏幕常亮
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
释放屏幕
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
0 0
- Android保持屏幕常亮
- android保持屏幕常亮
- Android 保持屏幕常亮
- Android保持屏幕常亮
- Android保持屏幕常亮
- Android保持屏幕常亮
- Android 保持屏幕常亮
- Android保持屏幕常亮
- android 保持屏幕常亮
- Android 保持屏幕常亮
- android:保持屏幕常亮
- Android保持屏幕常亮
- Android 保持屏幕常亮
- android保持屏幕常亮
- Android保持屏幕常亮
- Android保持屏幕常亮
- android保持屏幕常亮
- Android 屏幕保持常亮
- 利用分类(category)扩充UIImage,实现按钮点击改变背景颜色
- linux 到windows平台c++工程移植(持续更新)
- ARM 内核分类
- 使用Android Studio 进行NDK开发和调试
- GCC、头文件查找顺序总结
- android保持屏幕常亮
- 20、Mysql语句快速复习
- Java多线程编程-线程池的使用
- JAVA--简易聊天室程序
- 79-命名空间
- 9轴陀螺仪KF系列算法的轴向问题
- 80-定义接口
- "Cannot declare member function ...to have static linkage"错误
- Ignatius and the Princess III hdoj 1028 (母函数初学)