Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当一个活动打开时,我需要将焦点设置在两个编辑文本之一上并自动打开软键盘,这样用户就可以开始打字了。如何才能做到这一点?
在布局的 xml 中,<requestFocus />在您想要聚焦的 EditText 下添加。
<requestFocus />