Step indicator for onboarding or simple viewpager
Step indicator for onboarding or simple viewpager
Designed by the awesome https://dribbble.com/LeslyPyram :)
iOS (swift) version available at https://github.com/chenyun122/StepIndicator
You can checkout the Sample Application on the Play Store
First, add jitpack in your build.gradle at the end of repositories:
repositories {
// ...
maven { url "https://jitpack.io" }
}Then, add the library dependency:
compile 'com.github.badoualy:stepper-indicator:1.0.7'Now go do some awesome stuff!
<com.badoualy.stepperindicator.StepperIndicator
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:stpi_stepCount="5"/>Attributes:
| Name | Description | Default value |
|---|---|---|
| stpi_animDuration | duration of the line tracing animation | 250 ms |
| stpi_stepCount | number of pages/steps | |
| stpi_circleColor | color of the stroke circle | #b3bdc2 (grey) |
| stpi_circleRadius | radius of the circle | 10dp |
| stpi_circleStrokeWidth | width of circle's radius | 4dp |
| stpi_indicatorColor | color for the current page indicator | #00b47c (green) |
| stpi_indicatorRadius | radius for the circle of the current page indicator | 4dp |
| stpi_lineColor | color of the line between indicators | #b3bdc2 (grey) |
| stpi_lineDoneColor | color of a line when step is done | #00b47c (green) |
| stpi_lineStrokeWidth | width of the line stroke | 2dp |
| stpi_lineMargin | margin at each side of the line | 5dp |
| stpi_showDoneIcon | show the done check icon or not | true |
indicator.setViewPager(pager);
// or keep last page as "end page"
indicator.setViewPager(pager, pager.getAdapter().getCount() - 1); //
// or manual change
indicator.setStepCount(3);
indicator.setCurrentStep(2);…No open issues yet, or sync has not completed.