当我使用RecyclerView和SwipeRefreshLayout在MotionLayout中做一些动画时,这件事变得很奇怪

问题描述 投票:1回答:1

当RecyclerView向上拖动时,我正在使用MotionLayout来实现一些很酷的效果,但看起来当我想在RecyclerView中使用SwipeRefreshLayout时,事情就会发生冲突。

如果没有SwipeRefreshLayout,那很好

如果我使用SwipeRefreshLayout进行环绕,那么拖动行为就像反对一样奇怪

https://gist.github.com/GHChrisSu/6aadf40dc693bc47cbb83a167a82a4b9

运动场景如下

https://gist.github.com/GHChrisSu/a154d59f34555cccfc1b48617989ae16

android android-recyclerview swiperefreshlayout android-motionlayout
1个回答
0
投票

我最后通过将SwipeRefreshLayout包装出motionlayout来解决这个问题,并在onTransitionChange函数中更改SwipeRefreshLayout的状态来处理这个问题

© www.soinside.com 2019 - 2024. All rights reserved.