I'm trying to make my custom keyboard to change his colors according to the current theme in project, but it fails, this is my code:
<?xml version="1.0" encoding="UTF-8"?>
<android.inputmethodservice.KeyboardView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/keyboard"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:keyBackground = "@drawable/keybackground"
android:keyTextColor="?attr/colorPrimary"
android:background="?attr/android:colorBackground"
android:keyTextSize="22sp"/>
When I put regular colors everything works fine! How can I do it flexible?