This question already has an answer here:
I am working on a Custom Keyboard App. I need to set different themes for keys or background color in KeyboardView class and get key color at onCreateInputView() in SoftKeyboard extends InputMethodService Class.
However I am not getting how to get particular key according to keycode so I can change color or background of particular key.
On any diffrent input layout use android:keyBackground=".."
example:
input.xml:
input1.xml:
then on OnCreateInputView method:
and on the end of the method onStartInput add this:
If you've already done it and what you need is to set a different background to special keys. Maybe the solution to my problem that I wrote will help you: https://stackoverflow.com/a/18354298/2683898
Good Luck! :)