Colton Idle
08/19/2021, 9:17 PMZach Klippenstein (he/him) [MOD]
08/19/2021, 9:30 PMColton Idle
08/19/2021, 9:48 PMZach Klippenstein (he/him) [MOD]
08/19/2021, 9:57 PMBox(Modifier.background(Color.Magenta)) {
  GradientBackground(
    Modifier
      .fillMaxSize()
      .offset { IntOffset(0, -scrollState.value) }
  )
  LazyColumn(…)
}Colton Idle
08/19/2021, 10:01 PMColton Idle
08/20/2021, 12:27 AMAshu
08/20/2021, 5:11 AMColton Idle
08/20/2021, 5:51 AMColton Idle
08/20/2021, 5:52 AMAshu
08/20/2021, 3:53 PMColton Idle
09/15/2021, 12:40 AMval scrollState = rememberScrollState()
Box(modifier = Modifier.fillMaxSize()
) {
    Box(
        Modifier.matchParentSize().offset { IntOffset(0, scrollState.maxValue - scrollState.value) }.background(Color.Magenta)
    )
    Column(
        horizontalAlignment = Alignment.CenterHorizontally,
        modifier =
        Modifier.fillMaxSize()
                .verticalScroll(scrollState)Colton Idle
09/15/2021, 1:13 AMval scrollState = rememberScrollState()
BoxWithConstraints(modifier = Modifier.fillMaxSize()) {
    val constraintBox = this@BoxWithConstraints
    Box(
        Modifier.matchParentSize()
            .offset {
                IntOffset(
                    0,
                    if (constraintBox.maxHeight.roundToPx() -
                        scrollState.value >= 0)
                        constraintBox.maxHeight.roundToPx() -
                            scrollState.value
                    else 0)
            }Zach Klippenstein (he/him) [MOD]
09/15/2021, 3:18 PMdrawBehindColton Idle
09/15/2021, 3:26 PMColton Idle
09/16/2021, 1:29 AMBox(
    Modifier.matchParentSize()
        .drawBehind {
            drawRect(
                color = Color.Magenta,
                topLeft = Offset(size.width, -scrollState.value.toFloat()),
                size = Size(size.width, size.height))
        }Zach Klippenstein (he/him) [MOD]
09/16/2021, 12:12 PMsize.widthsize.drawWithCache {
  // Don't trigger any more draw invalidations once scrolled past the first screen.
  val colorTop = derivedStateOf { (size.height - scrollState.value.toFloat()).coerceAtLeast(0f) }
  onDrawBehind {
    drawRect(
      color = Color.Magenta,
      topLeft = Offset(0f, colorTop)
    )
  }
}Colton Idle
09/20/2021, 1:14 AM