Open vidicunt opened 4 years ago
Hello For your first issue just add app:layout_behavior="@string/appbar_scrolling_view_behavior" into FrameLayout which covers RefreshLayout
For second issue the only way to fix this issue with appbar is to set listener for AppBarLayout
appBar.addOnOffsetChangedListener(AppBarLayout.OnOffsetChangedListener { appBarLayout, verticalOffset -> //swip is IGRefreshLayout instance swipe.isEnabled = verticalOffset == 0 })
Case with Coordinator and AppBarLayout not implemented yet
Unfortunately for the second case the refresh layout scrolls up and remains there, in the disabled state without ever coming back down
Everything works as a charm in my device, maybe you miss something, here is my code
Issue 1.:
This is my layout:
The appbarlayout scrolls with these flags: app:layout_scrollFlags="scroll|snap|exitUntilCollapsed. The IGRefreshLayout overrides this scroll, and instead triggers the refresh animation, without letting the appbarlayout show itself first. Scrolling a bit down, and then up again fixes this issue.
Issue 2.: The same layout, but with the IGRefreshLayout as the top element has this same effect + when scrolling up, the views from the recyclerlayout are not recycled, and the IGRefreshLayout animation triggers again.