单击或触摸 JetBoy 示例应用程序上的屏幕
有什么方法可以设置此应用程序,使其不需要按键,而是需要触摸/单击事件?游戏中的其他按钮等以这种方式处理触摸屏,因此所需要做的就是用触摸/单击事件替换“按键”事件(因为只有一个控件)
这是我认为当前的按键代码(抱歉,如果错了 - 对于 Android 开发来说非常陌生!)
@Override
public boolean onKeyDown(int keyCode, KeyEvent msg) {
if (keyCode == 4)
super.onKeyDown(keyCode, msg);
return mJetBoyThread.doKeyDown(keyCode, msg);
}
谢谢! :)
Is there any way I can set this app so instead of taking a keypress, it takes a touch/click event instead? The other buttons etc in the game handle touchscreen this way, so all it would need to do would be to substitute the "keypress" event with the touch/click one (as there is only one control)
This is the current keypress code I think (sorry if it's wrong - very new to android development!)
@Override
public boolean onKeyDown(int keyCode, KeyEvent msg) {
if (keyCode == 4)
super.onKeyDown(keyCode, msg);
return mJetBoyThread.doKeyDown(keyCode, msg);
}
Thanks!! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论