查看google文档,这个属性就不是给manifest用的==。
added in API level 1
int keepScreenOn
Controls whether the view’s window should keep the screen on while visible.
May be a boolean value, such as “true” or “false”.
Constant Value: 16843286 (0x01010216)
控制当view显示时是否保持屏幕常亮(隐藏意思是view invisible时这个方法是无效的?待测试) ,也可以通过view的属性来设置是否要保持常亮。
根据google的用法:
Another way to implement this is in your application’s layout XML file, by using the android:keepScreenOn attribute:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:keepScreenOn="true">
...
</RelativeLayout>
本文介绍了一个Android属性——keepScreenOn,该属性用于控制视图窗口在可见时是否保持屏幕常亮。同时提供了XML布局文件中使用该属性的例子。

4526

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



