2

I want to know how to change default soft keyboard background color ?

abrutsze
  • 496
  • 1
  • 8
  • 24
  • 3
    Possible duplicate of [How do I change the background color of default keyboard used in an app?](https://stackoverflow.com/questions/8896287/how-do-i-change-the-background-color-of-default-keyboard-used-in-an-app) – ADM Dec 15 '17 at 09:58
  • you can create your own custom keyboard – ND1010_ Dec 15 '17 at 10:00
  • from here http://tutorials-android.blogspot.in/2011/06/create-your-own-custom-keyboard-for.html – ND1010_ Dec 15 '17 at 10:01
  • create custom keyboard : https://code.tutsplus.com/tutorials/create-a-custom-keyboard-on-android--cms-22615 – ND1010_ Dec 15 '17 at 10:02
  • 1
    I do not want to create custom one, I need a original one – abrutsze Dec 15 '17 at 10:03

1 Answers1

0

There is a XML-Attribute called keyBackground. Just set this attribute to a drawable and it will change image for the key. This image needs to be a StateListDrawable, with the following possible states: normal, pressed, checkable, checkable+pressed, checkable+checked, checkable+checked+pressed.

Add this attrbute to the KeyboardView in xml:

<KeyboardView android:keyBackground="@drawable/whatever_you_want />

See this tutorial

Rainmaker
  • 10,294
  • 9
  • 54
  • 89