changing keyboard keyIcon and keyBackground programatically in a custom keyboard Ask Question

463 views
Skip to first unread message

khalid bitar

unread,
Sep 21, 2018, 4:43:47 PM9/21/18
to Google Mobile Ads SDK Developers

I want to change key background color and text color based on user selection but I could not find a way for that using KeyboardView or Keyboard objects in java file, can any one help ? here is my XML code

<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:layout_alignParentBottom="true"
android:keyPreviewLayout ="@layout/preview"
android:keyBackground="@drawable/background2"
android:labelTextSize="12sp"
android:keyHeight="@dimen/keyheight"
/>

and here is my java code

KeyboardView kv =(KeyboardView)getLayoutInflater().inflate(R.layout.keyboard, null);
Keyboard keyboard = new Keyboard(this, R.id.xmlKeyboard);

mobileadssdk-a...@google.com

unread,
Sep 23, 2018, 11:55:12 PM9/23/18
to khalid bitar, Google Mobile Ads SDK Developers
Hi,

Please note that this forum only caters to technical questions specific to the code implementation of the Mobile Ads SDK. Since your concern is more on general Android code implementation, it's best to raise them over to the experts at the Android developer forums to get more accurate recommendations.

Regards,
Ivan Bautista
Mobile Ads SDK Team



--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/9c24e216-bb32-46f9-afde-4337424b8660%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages