Skip to content

trafi/rating-seek-bar

Repository files navigation

RatingSeekBar

Sample GIF

Custom view for Net Promoter Score (NPS) or other score-based rating input on Android. Looking for iOS?

Usage

<com.trafi.ratingseekbar.RatingSeekBar
    android:id="@+id/seek_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:rsb_max="10" />
seek_bar.setOnSeekBarChangeListener { view, rating ->
    // use rating
}

Or try out the included sample.

Installation

// top-level build.gradle
allprojects {
    repositories {
        // ..
        maven { url 'https://jitpack.io' }
    }
}

// module build.gradle
dependencies {
    // ..
    implementation 'com.trafi:rating-seek-bar:0.4-alpha'
}

Advanced usage

<com.trafi.ratingseekbar.RatingSeekBar
    android:id="@+id/seek_bar"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:rsb_max="10"
    app:rsb_active_color="#1F757B"
    app:rsb_active_text_color="#FFFFFF"
    app:rsb_inactive_color="#FAF8FA"
    app:rsb_inactive_text_color="#110711"
    app:rsb_text_size="14sp" />

About

Swipeable NPS rating input widget for Android

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages