Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Add Scrollbar in RecordsList
Browse files Browse the repository at this point in the history
  • Loading branch information
SanmerDev committed Jun 7, 2023
1 parent aeb9cbf commit 4601ed8
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.sanmer.geomag.ui.screens.records

import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.gestures.Orientation
import androidx.compose.foundation.interaction.MutableInteractionSource
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
Expand All @@ -28,9 +30,12 @@ import androidx.compose.ui.unit.dp
import androidx.navigation.NavController
import com.sanmer.geomag.R
import com.sanmer.geomag.model.Record
import com.sanmer.geomag.ui.component.FastScrollbar
import com.sanmer.geomag.ui.component.Logo
import com.sanmer.geomag.ui.navigation.animated.createViewRoute
import com.sanmer.geomag.ui.utils.navigatePopUpTo
import com.sanmer.geomag.ui.utils.rememberFastScroller
import com.sanmer.geomag.ui.utils.scrollbarState

@Composable
fun RecordsList(
Expand Down Expand Up @@ -59,6 +64,16 @@ fun RecordsList(
)
}
}

FastScrollbar(
modifier = Modifier
.fillMaxHeight()
.align(Alignment.CenterEnd),
state = state.scrollbarState(),
orientation = Orientation.Vertical,
scrollInProgress = state.isScrollInProgress,
onThumbDisplaced = state.rememberFastScroller(),
)
}

@Composable
Expand Down

0 comments on commit 4601ed8

Please sign in to comment.