Marcin Wisniowski
06/25/2023, 3:50 PMStylianos Gakis
06/25/2023, 4:52 PMMarcin Wisniowski
06/26/2023, 12:42 PMChris Sinco [G]
06/27/2023, 7:27 AMChris Sinco [G]
06/27/2023, 7:28 AMStylianos Gakis
06/27/2023, 7:32 AMval systemBarInsetTopDp = with(LocalDensity.current) {
WindowInsets.systemBars.getTop(this).toDp()
}
val pullRefreshState = rememberPullRefreshState(
refreshing = isLoading,
onRefresh = reload,
refreshingOffset = PullRefreshDefaults.RefreshingOffset + systemBarInsetTopDp,
)
// And then just call the composable inside a Box() which is full-screen, aligned to TopCenter
PullRefreshIndicator(
refreshing = isLoading,
state = pullRefreshState,
scale = true,
modifier = Modifier.align(Alignment.TopCenter),
)
Chris Sinco [G]
06/27/2023, 7:34 AMStylianos Gakis
06/27/2023, 7:42 AMandroidx.compose.material.pullrefresh.PullRefreshIndicator
composable behaves like this, it looks cut-off which imo looks even worse no?Chris Sinco [G]
06/27/2023, 7:59 AMStylianos Gakis
06/27/2023, 8:18 AM.graphicsLayer {
alpha = pullRefreshState.progress
// clip = true // If I add this or not add it, I get in both cases super odd behavior, only with clip = true it doesn't show up at all when actually loading as the video shows
},
I get this super odd behavior blob shrugLouis Pullen-Freilich [G]
06/27/2023, 5:24 PMModifier.offset(y = -systemBarInsetTopDp)
Louis Pullen-Freilich [G]
06/27/2023, 5:25 PMStylianos Gakis
06/27/2023, 5:25 PMLouis Pullen-Freilich [G]
06/27/2023, 5:26 PMMarcin Wisniowski
06/27/2023, 5:28 PMThere’s no design guidanceI wonder if that's just not done yet, or is it lacking on purpose and pull to refresh is just not part of the Material 3 design system. Especially that the Material3 Compose library has removed it.
Louis Pullen-Freilich [G]
06/27/2023, 5:29 PMLouis Pullen-Freilich [G]
06/27/2023, 5:34 PMChris Sinco [G]
06/27/2023, 6:09 PMChris Sinco [G]
06/27/2023, 6:10 PMChris Sinco [G]
06/27/2023, 6:10 PMStylianos Gakis
06/27/2023, 6:11 PMStylianos Gakis
06/27/2023, 6:17 PM