How to remove focus without setting focus to another control?

后端 未结 11 1787
终归单人心
终归单人心 2020-11-28 22:02

I like my UIs to be intuitive; each screen should naturally and unobtrusively guide the user on to the next step in the app. Barring that, I strive to make things as confusi

11条回答
  •  -上瘾入骨i
    2020-11-28 22:05

    Old question, but I came across it when I had a similar issue and thought I'd share what I ended up doing.

    The view that gained focus was different each time so I used the very generic:

    View current = getCurrentFocus();
    if (current != null) current.clearFocus();
    

提交回复
热议问题