Quando inizia il mio frammento, voglio mettere a fuoco il mio edittext/lasciare che l'utente inizi a digitarlo. Sono in grado di metterlo a fuoco con requestFocus(), ma non riesco a far apparire la tastiera.Mostra tastiera per edittext all'avvio del frammento
Ho provato sia questo:
edit = (EditText) view.findViewById(R.id.search);
edit.requestFocus();
InputMethodManager imgr = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imgr.showSoftInput(edit, 0);
e
edit = (EditText) view.findViewById(R.id.search);
InputMethodManager imgr = (InputMethodManager) getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imgr.showSoftInput(edit, 0);
edit.requestFocus();
Come posso ottenere la tastiera a presentarsi per EditText?
Questo è ciò che ha funzionato per me - [http://stackoverflow.com/questions/14759253/show-keyboard-automatically/39658629#39658629](http://stackoverflow.com/questions/14759253/show-keyboard-automatically/39658629#39658629) – v01d
La mia reputazione è troppo basso per commentare th e domanda. Ho risposto [qui] (http://stackoverflow.com/a/43807917/5390932) con un metodo per controllare quando mostrare o nascondere la tastiera – Catapimba