Showing Android keyboard when activity/fragment first appears -


it seems in recent versions of android, focusing input automatically shows soft keyboard (which i'd happen). when activity/fragment first appears, if input focused, keyboard isn't onscreen. i've gone through bunch of posts seem provide solutions, can none of them work.

this feels 1 of one-liners haven't managed dig up...what's answer?

sometimes gave , :

final inputmethodmanager imm = (inputmethodmanager) getactivity()                                 .getsystemservice(context.input_method_service);     textview.postdelayed(new runnable() {                                  @override                                 public void run() {                                      imm.showsoftinput(textview,                                             inputmethodmanager.show_implicit);                                     textview.selectall();                                 }                             }, 200); 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -