Android 键盘处理入门?
我有一本书,应该教授有关 Android 编程的所有内容。不幸的是,那本书缺少太多有关基础知识的信息,甚至一点都不好笑。它的索引甚至不包含 onKeyDown() 的条目...
您能推荐一个资源来教像我这样的 n00b 如何处理键盘事件,甚至可能了解它们是如何工作的吗?
例如,如何将我编写的函数挂接到组合键上?
仅触摸屏的 Android 设备中是否存在“组合键”?
I have an book that's supposed to teach everything about Android programming. Unfortunately that book is missing so much information on fundamental stuff, it's not even funny. Its index doesn't even include an entry for onKeyDown()...
Can you recommend a resource that can teach a n00b like me how to handle keyboard events and possibly even understand how they work?
For example, how do I hook a function that I wrote to a key combination?
Does "key combination" exist in touchscreen-only Android devices?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定 Android 中是否可以使用组合键,因为有些设备仅支持单点触控(并且没有键盘)。当然,可能会有一些变化。您可以在 Android 硬件兼容性参考。
如需指导,您可以查看 Android 版UI 事件指南。另外,您可以尝试搜索 Google 或 StackOverflow,因为有许多针对初学者的有用指南和教程。你只需要把它们挖出来就可以了。
I am not sure you can have key combinations in Android, as there are devices that only have single touch support (and no keyboards). Of course, there could have been changes. You may find some info in the android hardware compatibility reference.
For guidance you may look at the UI Events guide for Android. Also, you may try searching Google, or StackOverflow, as there are many helpful guides and tutorials for beginners. You just have to dig them out.