android - How do I add focus to a EditText when clicking on another TextView -
i'm using hidden edittext (visibility not set invisible, rather edittext has 0dp width , height) receive user input. i'm using input data fill other textviews. reason i'm doing because don't want visible forms (the textviews) have same properties actual edittext, want use soft keyboard.
my problem when user chooses hide keyboard, either pressing or 'done' button, want make reappear when click on textview, once again can start editing hidden edittext.
i've tried following code, no success:
if(hiddenet.requestfocus()) { getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_visible); }
the code within if-statement run, soft keyboard doesn't reappear.
is there separate function calling soft keyboard?
try following code inside textview's on click..
hiddenet.requestfocus(); inputmethodmanager imm = (inputmethodmanager) getsystemservice(context.input_method_service); imm.showsoftinput(hiddenet, inputmethodmanager.show_implicit);
Comments
Post a Comment