当RecyclerView向上拖动时,我正在使用MotionLayout来实现一些很酷的效果,但看起来当我想在RecyclerView中使用SwipeRefreshLayout时,事情就会发生冲突。
如果没有SwipeRefreshLayout,那很好
如果我使用SwipeRefreshLayout进行环绕,那么拖动行为就像反对一样奇怪
https://gist.github.com/GHChrisSu/6aadf40dc693bc47cbb83a167a82a4b9
运动场景如下
https://gist.github.com/GHChrisSu/a154d59f34555cccfc1b48617989ae16
我最后通过将SwipeRefreshLayout包装出motionlayout来解决这个问题,并在onTransitionChange函数中更改SwipeRefreshLayout的状态来处理这个问题