Value Picker Slider

It is a Horizontal slider value picker, which can be customized heavily to pick the desired number. Build fully in Jetpack Compose.
Installation
Add it in your root build.gradle or settings.gradle at the end of repositories:
repositories {
mavenCentral()
}
Add the dependency
dependencies {
implementation(io.github.rajdeepvaghela.valuepickerslider:slider:2.0.1)
}
Usage
val sliderState = rememberSliderState(
range = 880..1080,
currentValue = 910f,
barBreaks = listOf(
BarBreak(10, 1f),
BarBreak(, ),
BarBreak(, )
)
)
ValuePickerSlider(
state = sliderState,
numSegments = ,
currentValueLabel = {
Text(
text = getFmName(it / ),
color = MaterialTheme.colorScheme.onBackground,
modifier = Modifier.background(MaterialTheme.colorScheme.background)
)
},
indicatorLabel = {
(it % == ) {
Text(
text = numberFormat.format(it / ),
color = MaterialTheme.colorScheme.onBackground,
)
}
},
currentBarColor = Color.Red,
modifier = Modifier.fillMaxWidth()
)
License
Copyright 2024 Rajdeep Vaghela
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.