I would like to create a custom keyboard for my app and it is possible to change the keyboard layout Fig.1 to Fig.2 without the user go to phone settings to change the keyboard.
Fig. 1
I would like to create a custom keyboard for my app and it is possible to change the keyboard layout Fig.1 to Fig.2 without the user go to phone settings to change the keyboard.
According to this article from Android Developer you can allow users to switch easily among multiple IME subtypes by providing a switching key, such as the globe-shaped language icon, as part of the keyboard. Doing so greatly improves the keyboard's usability, and can help avoid user frustration. To enable such switching, perform the following steps:
<input-method xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.example.softkeyboard.Settings"
android:icon="@drawable/ime_icon"
android:supportsSwitchingToNextInputMethod="true">
With this I think that the user could change the keyboard layout without going to settings of the phone
Example: https://android.googlesource.com/platform/development/+/master/samples/SoftKeyboard/
We created a keyboard specifically for our application, but you did need to 1) install the application, 2) go to Settings->Input Type ->keyboard and select the keyboard for use.
Here is a link to the keyboard on github:
https://github.com/techartist/MultiLanguageKeyboard
Not sure you can do what you asked. According to this link:
Switch android keyboard profile programmatically
...it is not possible.