Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
游戏运行完美。但是在玩的时候按电源键就卡住了。线程一直在运行,因为游戏屏幕是打开的,但我的更新方法不起作用。我必须按主页键按钮,解锁手机并恢复我的游戏,然后它才能完美运行。
有谁能够帮助我。提前致谢。
我有解决方案..谢谢大家
我在 onPause() 方法中这样做
if (_thread != null) { _thread.setRunning(false); }
和 onResume() 方法
我在做这个 _thread.setRunning(true)
我刚刚在 onPause 方法中注释了 setRunning(false),现在它工作正常。