Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create own key on soft Keyboard

In xml file i do next:

   <Row>
        <Key android:codes="FLAG_EDITOR_ACTION" android:keyLabel="Start"  />
    </Row>

In class Keyboard in the method onKeyDown i create next construction

@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
switch (keyCode) {
case KeyEvent.FLAG_EDITOR_ACTION: {

            return true;
}
...

but is dont work. What's wrong?

like image 766
user1755546 Avatar asked Nov 30 '12 11:11

user1755546


People also ask

Can you make your own keyboard on iPhone?

The xKeyboard is a keyboard extension in which you can add special symbols and words as you needs. There are lots of unicode characters and special symbols you can use. You could use the custom keyboard you build in word, PPT, Excel, notes and other text apps on iPhone or iPad.


1 Answers

you can add some action in keypad in android, use

android:imeOptions="actionDone"

There are so many likr Go, Done, Search and many... and perform action by using EditorActionListener

like image 142
kumar_android Avatar answered Oct 22 '22 17:10

kumar_android