Skip to content

Repository files navigation

SegmentSeekBarView

Kotlin XML XML

SAMPLE:
SegmentSeekBarView Demo

Installation

To get started with SegmentSeekBarView in your Android XML project, Add it in your root build.gradle at the end of repositories:

allprojects {
	repositories {
		...
	    maven { url 'https://jitpack.io' }
    }
}

Lastly, add the following dependency to your app's build.gradle.kts (Kotlin) or build.gradle (Groovy) file:

Kotlin
dependencies {
    implementation("com.github.osawant023:SegmentSeekBarView:$currentVersion")
}
Groovy
dependencies {
    implementation 'com.github.osawant023:SegmentSeekBarView:$currentVersion'
}

Usage

Segments configuration

 segmentProgressView.setSegments(
            barHeight = 20,
            value = 50f ,
            max = 100f ,
            badgeWidth = 15,
            badgeHeight = 15,
            newSegments = arrayListOf(
                SegmentData(
                    "Segment 1",
                    ContextCompat.getColor(this, R.color.red1),
                    "25"
                ),
                SegmentData(
                    "Segment 2",
                    ContextCompat.getColor(this, R.color.red2),
                    "50"
                ),
                SegmentData(
                    "Segment 3",
                    ContextCompat.getColor(this, R.color.red3),
                    "75"
                ),
                SegmentData(
                    "Segment 4",
                    ContextCompat.getColor(this, R.color.red4),
                    "100"
                )
            ),

        )
segmentProgressView.invalidate()

About

Developed a reusable Android UI library for segmented seek bars, enabling discrete value selection with customizable styling and smooth user interaction.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages