This article describes the focus re-get method containing EditText in Android GridView. Share it for your reference, as follows:
The problem encountered in the project is that when the interface is refreshed, EditText loses focus, and then you need to regain focus.
EditText editText = (EditText) (.gridview_edittext_item); //gridview_edittext_item is placed in the corresponding adapter's xml fileif (editText != null) { (InputType.TYPE_CLASS_NUMBER);//Input type(true); (true); (); }
For more information about Android related content, please check out the topic of this site:Android debugging skills and solutions to common problems》、《Android development introduction and advanced tutorial》、《Android multimedia operation skills summary (audio, video, recording, etc.)》、《Summary of the usage of basic Android components》、《Android View View Tips Summary》、《Android layout layout tips summary"and"Android control usage summary》
I hope this article will be helpful to everyone's Android programming design.