安卓:不关闭prevent显示 [英] Android: prevent display from turning off

查看:97
本文介绍了安卓:不关闭prevent显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个小游戏,只有通过一些传感器进行控制。有没有touchscreninput或类似的东西。

I've written a small game, that is only controlled via some sensors. There is no touchscreninput or something similar.

现在的问题是,该游戏的几秒钟后,屏幕将自动(因为没有触摸输入)关闭

The problem is, that after a few seconds of gaming, the screen turns off (because of no touch-input)

有什么样的清单,条目prevents从这种行为的屏幕?

Is there something like a manifest-entry that prevents the screen from this behaviour?

关于

推荐答案

最简单的将加入机器人:keepScreenOn =真正的来在你的XML布局

The simplest would be adding android:keepScreenOn="true" to the layout in your xml.

这篇关于安卓:不关闭prevent显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆