开发者

How to enable on-screen keyboard?

I have one screen. it consists of an edit text. I want when this screen shown on the screen, keypad automatically shown by开发者_如何学JAVA default without clicking on the edit text.


Have you tried something like:

InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.showSoftInputFromInputMethod(myEditText.getWindowToken(), 0);


In your App Manifest.xml file, you can set the soft keyboard status. Sounds like you want to set it to "stateVisible" or "stateAlwaysVisible"

android:windowSoftInputMode=["stateUnspecified",
                                   "stateUnchanged", "stateHidden",
                                   "stateAlwaysHidden", "stateVisible",
                                   "stateAlwaysVisible", "adjustUnspecified",
                                   "adjustResize", "adjustPan"] > 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜