How to set focus on a view when a layout is created and displayed?

后端 未结 15 1192
Happy的楠姐
Happy的楠姐 2020-12-02 15:07

Currently, I have a layout which contains a Button, a TextView and an EditText. When the layout is displayed, the focus will be automa

15条回答
  •  伪装坚强ぢ
    2020-12-02 15:40

    you can add an edit text of size "0 dip" as the first control in ur xml, so, that will get the focus on render.(make sure its focusable and all...)

提交回复
热议问题