StackOverflowMaster
StackOverflowMaster

Reputation: 3498

android soft keyboard doesn't show

I don't know if this is a programming issue or rather an issue with the phone itself, but I'm testing my app and when testing it on a Galaxy Nexus, when I click on an EditText, SOMETIMES the keyboard doesn't show. No matter how many times I click on it, the keyboard won't pop up. After I close out of the app and re-open it, then the keyboard will show after clicking on the EditText.

I don't get these issues testing my app on a Nexus 7 or any of the emulators. Is this more of a problem with my phone than with my app? If so, won't this be an issue for anyone who owns a Galaxy Nexus and downloads my app?

Upvotes: 1

Views: 2543

Answers (1)

zozelfelfo
zozelfelfo

Reputation: 3776

if you are experiencing issues with your softkeyboard you can use this code to force it to appear:

 if(myEditText.requestFocus())   
    ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);

Hope it helps :)

Upvotes: 1

Related Questions