Softkeyboard with DPAD


Last Updated:

  1. kickwall

    kickwall New Member This Topic's Starter

    Joined:
    Sep 30, 2010
    Messages:
    1
    Likes Received:
    0
    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=&quot]case KeyEvent.KEYCODE_DPAD_UP:[/FONT][FONT=&quot]
    [/FONT][FONT=&quot] if (mInputView != null && mInputView.isShown()){[/FONT][FONT=&quot]
    [/FONT][FONT=&quot] Key a = mInputView.getKeyboard().getKeys().get(0); [/FONT][FONT=&quot]
    [/FONT][FONT=&quot] a.pressed=true;[/FONT][FONT=&quot]
    [/FONT][FONT=&quot]mInputView.refreshDrawableState();[/FONT][FONT=&quot]
    [/FONT]
    [FONT=&quot] 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]
     

    Advertisement

Share This Page

Loading...