0

How to change label of any key on Android default keyboard.

I want to do something like this,

enter image description here

3 Answers3

0

you can acheive this by using Use KeyboardView:

KeyboardView kbd = new KeyboardView(context);
kbd.setKeyboard(new Keyboard(this, R.xml.customlayout));

kbd.setOnKeyboardActionListener(new OnKeyboardActionListener() {
    ....
}

now you have kd which is a normal view.

The nice thing about this is that R.xml.custom refers to /res/xml/custom.xml, which defines in xml the layout of the keyboard. For more information on this file, look here: Keyboard, Keyboard.Row, Keyboard.Key.

Hamad
  • 5,096
  • 13
  • 37
  • 65
0

You can use your own keyboard to change the text and style of keyboard. Custom Keyboard

AmmY
  • 1,821
  • 1
  • 20
  • 31
0

you should have a look at ImeActionLabel or ImeActionId

<EditText android:id="@+id/some_edittext"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:imeOptions="actionSend">
</EditText>

Read this answer for more details

Community
  • 1
  • 1
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300