
public boolean onKeyDown(int keyCode,KeyEvent event)
参数是keyCode,按钮,用户按下,但KeyEvent是什么?解决方法 阅读 docs
总结Object used to report key and button events. Each key press is described by a sequence of key events. A key press starts with a key event with ACTION_DOWN. If the key is held sufficIEntly long that it repeats,then the initial down is followed additional key events with ACTION_DOWN and a non-zero value for getRepeatCount(). The last key event is a ACTION_UP for the key up. If the key press is canceled,the key up event will have the FLAG_CANCELED flag set.
以上是内存溢出为你收集整理的Android KeyEvent和keycode之间的区别全部内容,希望文章能够帮你解决Android KeyEvent和keycode之间的区别所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)