Android: How to create a button that produces the same result as hitting the down key on the D-Pad?
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.
精彩评论