android - EditText is not showing virtual keyboard -
i have created dynamic screen edittext in it..but after click not showing virtual keyboard.i have added these following codes..but still ot worked.
getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_visible);
and dint worked
inputmethodmanager im = (inputmethodmanager)getsystemservice(context.input_method_service);
im.showsoftinput(edittext, 0);
my code here...
runonuithread(new runnable() { public void run() { linearlayout findviewbyid = (linearlayout) findviewbyid(r.id.dynamicinputs); //textview textview = (textview) findviewbyid(r.id.name); textview textview = new textview(activity_userinput.this); textview.settext(" " + map.get(key_name) + " :"); textview.settextcolor(color.black); textview.settextsize(typedvalue.complex_unit_sp, 17); //textview.setlayoutparams(new layoutparams(layout.dir_left_to_right, gravity.center_vertical)); findviewbyid.addview(textview); edittext edittext = new edittext(activity_userinput.this); edittext.settext(""); //edittext.setinputtype(inputtype.type_class_number); findviewbyid.addview(edittext); }
let me try, think need set focus on edittext like..
edittext.setfocusableintouchmode(true); edittext.requestfocus();
i not sure try , let me know works or not.
Comments
Post a Comment