How to remove focus without setting focus to another control?

后端 未结 11 1814
终归单人心
终归单人心 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条回答
  •  没有蜡笔的小新
    2020-11-28 22:20

    First of all, it will 100% work........

    1. Create onResume() method.
    2. Inside this onResume() find the view which is focusing again and again by findViewById().
    3. Inside this onResume() set requestFocus() to this view.
    4. Inside this onResume() set clearFocus to this view.
    5. Go in xml of same layout and find that top view which you want to be focused and set focusable true and focusableInTuch true.
    6. Inside this onResume() find the above top view by findViewById
    7. Inside this onResume() set requestFocus() to this view at the last.
    8. And now enjoy......

提交回复
热议问题