harry248
11/22/2022, 2:48 PMharry248
11/22/2022, 2:55 PMLouis Pullen-Freilich [G]
11/22/2022, 3:09 PMModifier.clipToBounds()
before the Modifier.pullRefresh()
2. What is happening inside onRefresh
- are you setting refreshing
to true for the indicator?harry248
11/22/2022, 3:12 PMLouis Pullen-Freilich [G]
11/22/2022, 3:14 PMvar refreshing by remember { mutableStateOf(false) }
val state = rememberPullRefreshState(refreshing, onRefresh = {
refreshing = true
refreshing = false
})
(or some other conditional delay that may be less than a frame in length)
Then this could also cause the problemLouis Pullen-Freilich [G]
11/22/2022, 3:14 PMharry248
11/23/2022, 5:08 AMjasu
11/23/2022, 5:17 AMharry248
11/23/2022, 5:38 AMScrollableState
to determine whether or not it should collapse. The "extra" app bar contents (the textfield, the filter button and the large title), the app bar elevation and background color then hide/show using a mix of AnimatedContent
and animateXasState
. We are also using a SubcomposeLayout
to pass the app bar height as PaddingValues
to the lazy layout so that it can use that (top value) as the contentPadding
.jasu
11/23/2022, 5:54 AMLouis Pullen-Freilich [G]
11/23/2022, 12:40 PMAdding an additional delay did work. Beforehand we set the state depending on the request/response time which may be very fast if the response was served from the http cache - though that wasn't a problem using the accompanist variant.Yes this is a bug - the fix will be available in the next release so you won't need to add the delay (although for good user experience you may want to consider showing the indicator for a minimum amount of time so the user knows the refresh was successful / happened)
harry248
11/24/2022, 5:07 AM