Android requestfocus details and examples
•
Android
Android requestfocus details and examples
Use of requestfocus
In one sentence:
< requestfocus / >: the tag is used to specify the focus view in the screen.
The root node of the layout resource file can use container controls (such as LinearLayout, FrameLayout, etc.) or non container controls (such as EditText, textview, etc.). For non container controls, only the < requestfocus / > tag can be placed in the label of non container controls, indicating that the current control is set as the focus. The following code:
In this way, EditText gets the focus when entering.
The use of Android requestfocus is over.
Thank you for reading, hope to help you, thank you for your support to this site!
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码