android - Keyboard doesn't show up when EditText is in focus -


i want following. user should able input 1 letter (only letter) standard keyboard (hardware or software). if typing letter, previous letter should replaced one. current letter should displayed. user should able dismiss dialog , activity. , if clicked "done" button in keyboard activity should know letter entered.

so thought alert dialog , edit text extensions display current char. easy.

however, , gets me mad already, although edit text in focus keyboard not appear on screen until edit text clicked. why so? should be, should not?

i won't take following answer, because shouldn't have manually. should automatic. besides, i'm not sure how work hardware keyboard.

inputmethodmanager imm = inputmethodmanager)getsystemservice(context.input_method_service); imm.hidesoftinputfromwindow(youredittext.getwindowtoken(), 0); 

i want know why keyboard not shown after edit text has focus? , should functionality without manually enabling , disabling software keyboard.

use this.

edittext youredittext= (edittext) findviewbyid(r.id.youredittext); inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service); imm.showsoftinput(youredittext, inputmethodmanager.show_implicit); 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -