Home

Awesome

GaugeSeekBar

GaugeSeekBar is an Android library for displaying round seek bar view.

How to use

allprojects {
    repositories {
        maven { url 'http://repo.aws.10clouds.com:8081/artifactory/gradle-dev-local/' }
    }
}

dependencies {
    compile(group: 'tenclouds', name: 'gaugeseekbar', version: '1.0.1', ext: 'aar')
}

Available XML attributes

Attribute nameFormatDescription
startAngleDegreesfloatAngle between
thumbRadiusdimensionRadius of default thumb drawable, 11dp by default
thumbDrawablereferenceCustom thumb drawable to be used instead of default thumb drawable.
showThumbbooleanWhen set to "false" thumb is not shown, "true" by default.
thumbColorcolorDefault thumb drawable color, default value is #ff6f00
trackGradientcolor arrayArray of colors used to drawn track, can be contain only one color. Contains only grey color by default.
trackGradientPositionsreferenceArray of floats between 0.0 and 1.0 indicating gradient color positions in track, has to be the same size as trackGradient. If not supplied the colors would be positioned evenly.
showProgressbooleanIf set to false progress bar will not be drawn. True by default.
progressfloatFloat ranged between 0.0 and 1.0 indicating progress shown by the view. Any larger or smaller values will be interpreted as either 1, or 0.
interactivebooleanIf set to true user will be able to set the progress by touch, else progress update would be only possible from code. True by default.
trackWidthdimensionWidth of track and progress bar, 8dp by default.
progressGradientreferenceArray of colors used to drawn track, can be contain only one color. Contains green and red colors by default.
progressGradientPositionsreferenceArray of floats between 0.0 and 1.0 indicating gradient color positions in progress, has to be the same size as progressGradient. If not supplied the colors would be positioned evenly.

Examples

alt text

<com.tenclouds.gaugeseekbar.GaugeSeekBar
           ...
           app:thumbRadius="18dp"
           app:trackWidth="18dp" />

alt text

<com.tenclouds.gaugeseekbar.GaugeSeekBar
        ...
        app:interactive="false"
        app:progress="0.75"
        app:progressGradient="@array/progressColor"
        app:thumbColor="@color/colorPrimary"
        app:thumbRadius="18dp"
        app:trackWidth="18dp" />

alt text

<com.tenclouds.gaugeseekbar.GaugeSeekBar
        ...
        app:interactive="true"
        app:showProgress="false"
        app:startAngleDegrees="90"
        app:thumbColor="@color/colorPrimary"
        app:thumbDrawable="@drawable/custom_thumb"
        app:trackGradient="@array/progressRainbow"
        app:trackWidth="13dp" />