Change Keyboard Input Language Programmatically

You can change keyboard without user notification only and only if your app is running as a System app for security reasons. You need to give Android permission first in your app’s AndroidManifest.xml “android.permission.WRITE_SECURE_SETTINGS” Then you need to determine id of your keyboard. -> To know id, you need to keep your keyboard default from … Read more

How to change background color of key for android soft keyboard?

Add this line of code to your input.xml android:keyBackground=”@drawable/samplekeybackground” So your input.xml should end up looking similar to this. <com.example.keyboard.LatinKeyboardView xmlns:android=”http://schemas.android.com/apk/res/android” android:id=”@+id/keyboard” android:layout_alignParentBottom=”true” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:keyPreviewLayout=”@layout/input_key_preview” android:keyBackground=”@drawable/samplekeybackground” /> If you already have a drawable to use great otherwise here is a sample key background drawable that will produce results like your example image. <?xml version=”1.0″ … Read more

How to programmatically navigate WPF UI element tab stops?

You do that using MoveFocus as shown in this MSDN article which explains everything about focus: Focus Overview. Here is some sample code to get to the next focused element (got it from that article, slightly modified). // MoveFocus takes a TraversalRequest as its argument. TraversalRequest request = new TraversalRequest(FocusNavigationDirection.Next); // Gets the element with … Read more

How to resize UITextView on iOS when a keyboard appears?

The best result was reached by the following code. Also don’t forget to set background color to UIView and place UITextView before other top-screen controls (e.g. UITabBar). Editing of a text in the end still isn’t perfect now. You may try to improve. FirstViewController.h: @interface FirstViewController : UIViewController { IBOutlet UIBarButtonItem *buttonDone; IBOutlet UITextView *textView; … Read more