I want to let a key in softkeyboard change it's color when I press a DPAD arrow key, and I have tried this:
[FONT="]case KeyEvent.KEYCODE_DPAD_UP:[/FONT][FONT="]
[/FONT][FONT="] if (mInputView != null && mInputView.isShown()){[/FONT][FONT="]
[/FONT][FONT="] Key a = mInputView.getKeyboard().getKeys().get(0); [/FONT][FONT="]
[/FONT][FONT="] a.pressed=true;[/FONT][FONT="]
[/FONT][FONT="]mInputView.refreshDrawableState();[/FONT][FONT="]
[/FONT] [FONT="] updateInputViewShown();
But the key in softkeyboard didn't change it's color in realtime.
It will remain pressed state after I touch the key again by mouse cursor.
How can I change the key color in realtime when I press a DPAD arrow key?
Thanks a lot!
[/FONT]
[FONT="]case KeyEvent.KEYCODE_DPAD_UP:[/FONT][FONT="]
[/FONT][FONT="] if (mInputView != null && mInputView.isShown()){[/FONT][FONT="]
[/FONT][FONT="] Key a = mInputView.getKeyboard().getKeys().get(0); [/FONT][FONT="]
[/FONT][FONT="] a.pressed=true;[/FONT][FONT="]
[/FONT][FONT="]mInputView.refreshDrawableState();[/FONT][FONT="]
[/FONT] [FONT="] updateInputViewShown();
But the key in softkeyboard didn't change it's color in realtime.
It will remain pressed state after I touch the key again by mouse cursor.
How can I change the key color in realtime when I press a DPAD arrow key?
Thanks a lot!
[/FONT]