The example in this article describes the focus regain method that contains edittext in the Android GridView. Share to everyone for your reference, specific as follows:
The problem with the project is that when the interface is refreshed, EditText loses focus, and the focus needs to be retrieved.
EditText EditText = (edittext) Mgridview.findviewbyid (r.id.gridview_edittext_item);
Gridview_edittext_item is placed in the corresponding adapter XML file in the
if (edittext!= null) {
Edittext.setinputtype (inputtype.type _class_number);//input type
Edittext.setfocusableintouchmode (true);
Edittext.setfocusable (true);
Edittext.requestfocus ();
}
For more information on Android-related content readers can view the site topics: "Android Debugging techniques and common problems solution summary", "Android Development introduction and Advanced Course", "Android Multimedia operating skills Summary (audio, video, recording, etc.)", " Android Basic Components Usage Summary, Android View tips Summary, Android layout layout tips and Android Control usage summary
I hope this article will help you with the Android program.