Hi, I'm trying to implement a swipe refresh behav...
# compose
c
Hi, I'm trying to implement a swipe refresh behaviour in the middle of the screen, where the screen as a whole needs to be scrollable. Since Accompanist swipe refresh requires its child to be scrollable and I want the whole page to move (scroll) at once, I couldn't think of a way for days now.
Copy code
Column(
    Modifier
        .fillMaxSize()
        .verticalScroll(scrollState)
        .background(colorResource(id = R.color.colorBackground))
) {
           SwipeRefresh(state = swipeRefreshState, onRefresh = {
              scope.launch {
                pagingData.refresh()
                delay(TradeHistoryFragment.REFRESH_ATTEMPT_DELAY)
              }
        }) {
               Column(Modifier.fillMaxWidth().wrapContentHeight()) {
👀 1
It would be really perfect If I could just surround items{} with SwipeRefresh but since LazyColumn scope is SubComposeLayout? It doesn't allow to take it as the child.
j
@Izer Onadim