Skip to main content

Android implementation, virtual keyboard and Dialog

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2007-02-25


I have a form with TextFields and a button on it - a classical login form. Now when I enter a username and close Android's virtual keyboard using the hardware back-button (or the close button on the keyboard) the keyboard goes away. Then I show a Dialog and the keyboard suddenly pops up again.

The problem seems to appear only when I jump from one TextField to the other. When I close the keyboard in the first TextField and then move to the second TextField there's another problem: The keyboard shows up for less than a second and automatically disappears again.

Any ideas?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2007-02-25

I modified the setShowVirtualKeyboard() method in AndroidImplementation to look like this:
InputMethodManager manager = (InputMethodManager) LWUITActivity.currentActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(myView, 0);
} else {
manager.hideSoftInputFromWindow(myView.getWindowToken(), 0);
this.keyboardShowing = show;
This seems to fix the problem, though a (smaller) problem remains that sometimes the VKB doesn't show up and you have to click the back button twice.