How to clear focus for EditText?

前端 未结 8 1187
滥情空心
滥情空心 2021-01-30 12:54

I have an activity with a search box (EditText) on the top, and a ListView below. Whenever the activity starts, the EditText always has focus and bring up the keybo

8条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-30 13:44

    You can try this:

    editText.clearFocus();
    

    where ever you want to clear focus.

提交回复
热议问题