开发者

Android: How to create a button that produces the same result as hitting the down key on the D-Pad?

开发者 https://www.devze.com 2023-01-11 23:38 出处:网络
How do you create a button in an Android 开发者_开发知识库app that produces the same result as hitting the down key on the D-Pad?Send a key event of type KCODE_DPAD_DOWN.To send an event, you can use

How do you create a button in an Android 开发者_开发知识库app that produces the same result as hitting the down key on the D-Pad?


Send a key event of type KCODE_DPAD_DOWN. To send an event, you can use

InputMethodService.sendDownUpKeyEvents(keyEventCode);

See creating input method for more ways to send key events.

0

精彩评论

暂无评论...
验证码 换一张
取 消