How to remove focus from RecyclerView inside ScrollView?

前端 未结 5 1395
傲寒
傲寒 2020-12-05 07:37

I have a Scrollview which contains an ImageView and RecyclerView. if navigation drawer opened then closed the RecyclerView auto scrolling to top, How to stop this?



        
5条回答
  •  天涯浪人
    2020-12-05 08:33

    Check out clearFocus() from here Android Dev Doc.

    You can set a DrawerListener to your navigation drawer and use the onDrawerStateChanged() or some of the other options from here to call clearFocus() on your RecyclerView.

提交回复
热议问题