I’ve an issue with landscape softkeyboard on some, not all, android devices. Issue seems related with keyboard installed.
When I ask to device, java natively, to show keyboard, some phones does not show anything. Some other show it correctly. In portrait mode code always works fine. Using swiftkey keyboard code works fine in every phone tested.
public class Native extends Extension{
private static View view;
private static InputMethodManager imm;
public static void showKeyboard()
{
mainActivity.runOnUiThread(new Runnable()
{
public void run()
{
imm.showSoftInput(view, InputMethodManager.SHOW_IMPLICIT);
}
});
}
public static void hideKeyboard()
{
mainActivity.runOnUiThread(new Runnable()
{
public void run()
{
imm.hideSoftInputFromWindow(view.getWindowToken(), InputMethodManager.HIDE_IMPLICIT_ONLY);
}
});
}
public static void initialize(){
view = mainActivity.getCurrentFocus();
mainActivity.runOnUiThread(new Runnable()
{
public void run()
{
imm = (InputMethodManager) mainContext.getSystemService(mainContext.INPUT_METHOD_SERVICE);
}
});
}
}
Have you any advice to try to solve? I’ve tried many combination of showSoftInput with many values and same with toggleSoftInput. Results was same or worst (i.e. using SHOW_FORCED keyboard appear but is not sensitive, keys cannot be pressed)
Thanks in advance.
David.