i want focused on the searchview when redirect from one activity to other activity any suggestion?
thanks in Advance
答案 0 :(得分:1)
Use searchView.requestFocus()
In the onCreate method of your activity.
答案 1 :(得分:0)
如果你只想在创建活动时设置焦点,你可以在你的onCreate方法中使用searchView.requestFocus(),或者你可以在onStart方法中设置它,它会在每次活动到达前台后设置它它一直停止而不是被系统破坏。