A material design step bar module with multiple indicator styles.
- Add following repository to your project
build.gradle
:
buildscript {
repositories {
maven {
url 'https://dl.bintray.com/luscii/maven'
}
}
}
- Add following artifact to your module
build.gradle
:
dependencies {
implementation 'com.luscii.stepbar:stepbar:1.2'
}
Attribute | Type | Code | Description |
---|---|---|---|
stepCount | Integer | stepCount | Set total step count |
indicatorType | Enum | - | Set indicator type from dot or text |
- | Boolean | indicatorVisibility | Set indicator visibility |
leftButtonText | String | setLeftButtonText | Set left button text |
leftButtonIcon | Drawable | - | Set left button icon |
leftButtonType | Enum | - | Set left button type from primary , text or outlined |
leftButtonEnabled | Boolean | leftButtonEnabled | Set or check left button enabled or disabled |
- | Boolean | leftButtonVisible | Set or check left button visibility |
- | View.OnClickListener | leftButtonClickListener | Set left button click listener |
rightButtonText | String | setRightButtonText | Set right button text |
rightButtonIcon | Drawable | - | Set right button icon |
rightButtonType | Enum | - | Set right button type from primary , text or outlined |
rightButtonEnabled | Boolean | rightButtonEnabled | Set or check right button enabled or disabled |
- | Boolean | rightButtonVisible | Set or check right button visibility |
- | View.OnClickListener | rightButtonClickListener | Set right button click listener |
autoHideButtons | Boolean | autoHideButtons | If set the left button will be hidden on first step and the right button will be hidden on last step |
You can observe step changes using the setListener
method.
stepBar.setListener(object : StepBarListener {
override fun onStepChanged(step: Int) {
}
})