2

I got a code to change key label from my java file by

keyboard.getKeys().get(0).label= "@";

I want to change my key icon as well. But it fails.

keyboard.getKeys().get(9).icon= R.Drawable.myicon;

an error shows when I do like that saying that is int value. I don't how to make this possible in other way.

Any Help?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115

1 Answers1

2

Yes, you need drawable for icon as in

keyboard.getKeys().get(9).icon = ContextCompat.getDrawable(Context, R.drawable.myicon);
Rajan Kali
  • 12,627
  • 3
  • 25
  • 37