Nested Recyclerview scrolls by itself

前端 未结 7 805
情歌与酒
情歌与酒 2020-12-08 02:19

I have a parent recyclerview that has 3 child view in it. The last two of the child are recyclerview.

Parent recyclerview
 - child view 1
 - child view 2 (ho         


        
7条回答
  •  半阙折子戏
    2020-12-08 03:01

    Ah, I've been struggling for a fix. The solution is very simple actually. As a reference for me (and anyone else facing the same issue in the future), I just have to setFocusable() in the child view's rv to false, and it doesn't focus to that view anymore when the fragment is visible.

    In my case, I have to set it programmatically after data has been loaded from an API.

提交回复
热议问题