Android change background of key dynamically
- by Wouter
I'm building a custom keyboard in android.
My input.xml:
<com.mykeyboard.MyKeyboardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:keyBackground="@drawable/keybg"
/>
All the keys do have the same background.
Now I'm trying to dynamically change the background of one single key.
Is this possible?