Virtual Keyboard


Last Updated:

  1. deekjx

    deekjx Well-Known Member This Topic's Starter

    Joined:
    Jul 7, 2009
    Messages:
    75
    Likes Received:
    20
    Hello All,

    I'm new to these forums as well as new to coding on the android platform. After a several hours of research, I'm still unable to process the period entry made on the virtual keyboard. Does any one have a small code snippet or example explaining this?

    I can easily take the input from the real keyboard. After testing the early parts of my app, friend noticed that it didn't recognize the "." key when entering an IP address. What's funny is that it does recognize the numbers typed on the virtual keyboard. I have the following event handler:

    oct2.setOnKeyListener(new OnKeyListener() {
    public boolean onKey(View v, int keyCode, KeyEvent event) {
    if ((event.getAction() == KeyEvent.ACTION_DOWN) && (keyCode == KeyEvent.KEYCODE_PERIOD)) {
    // Perform action on key press
    oct3.requestFocus();
    return true;
    }
    return false;
    }
    });

    Most of this comes from the tutorial. I've found that there is a different listener for the virtual keyboard and have imported "android.inputmethodservice.KeyboardView.OnKeyboardActionListener" but I still can not get it to work.

    Any help that can be provided will be greatly appreciated.


    Deekjx
     

    Advertisement
  2. deekjx

    deekjx Well-Known Member This Topic's Starter

    Joined:
    Jul 7, 2009
    Messages:
    75
    Likes Received:
    20
    Has anyone coded any apps that use the a listern for the virtual keyboard at all?
     

Share This Page

Loading...