KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
When my fragment starts, I want my edittext to be in focus/let user to just start typing in it. I am able to get it in focus with requestFocus(), but I cannot get the keyboard to show up. I have tried both this: edit = (EditText) view.findViewById(R.id.search); edit.requestFocus(); InputMethodManager imgr = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imgr.showSoftInput(edit, 0); and edit = (EditText) view.findViewById(R.id.search); InputMethodManager imgr = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); imgr.showSoftInput(edit, 0); edit.requestFocus(); How can I get the keyboard to show up for EditText?
Tags (comma-separated)
Save Edits
Cancel