Right now it's showing English when click on the edit text. How can I change the keyboard to Arabic? I tried installing Arabic keyboard from Google Play, but it is not working in my app.
Asked
Active
Viewed 1,980 times
1 Answers
3
You cannot set a keyboard for an EditText. The keyboard (or IME) can only be set manually by the user. All you can do is open the dialog from where the user can choose the keyboard. Even for that, the keyboard needs to be enabled in the Language and Input settings
private void showInputMethodPicker() {
InputMethodManager imeManager = (InputMethodManager) getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
if (imeManager != null) {
imeManager.showInputMethodPicker();
} else {
Toast.makeText(this, R.string.not_possible_im_picker, Toast.LENGTH_LONG).show();
}
}

Basant Singh
- 5,736
- 2
- 28
- 49
-
-
Even if you create a custom keyboard, you won't be able to select it automatically. To make a keyboard, there are tutorials on the Android developers website. – Basant Singh Jun 19 '14 at 11:04