Android TextField : set focus + soft input programmatically

Good sir, try this:android

edittext.setFocusableInTouchMode(true); edittext.requestFocus();

Im not sure, but this might be required on some phones (some of the older devices):ide

finalInputMethodManager inputMethodManager =(InputMethodManager) context
                .getSystemService(Context.INPUT_METHOD_SERVICE);
inputMethodManager.showSoftInput(edittext,InputMethodManager.SHOW_IMPLICIT);
View Code

 



http://stackoverflow.com/questions/8080579/android-textfield-set-focus-soft-input-programmatically
相關文章
相關標籤/搜索