Compose-Stepper library provides a custom stepper in the modern android toolkit Jetpack compose which can be easily added in to your composable functions.
Please get Android Studio Arctic Fox 2020.3.1 or above from here and use JDK 11 to build this project.
Add the following code to your project's root build.gradle
file:
repositories {
maven { url "https://jitpack.io" }
}
Next, add the dependency below to your module's build.gradle
file:
dependencies {
implementation 'com.github.maryamrzdh:compose-stepper:1.0.0-beta01'
}
Example is in the source code.
val numberStep = 4
var currentStep by rememberSaveable { mutableStateOf(1) }
val titleList= arrayListOf("Step 1","Step 2","Step 3","Step 4")
Stepper(
numberOfSteps = numberStep,
currentStep = currentStep,
stepDescriptionList = titleList
)
Stepper(
modifier = Modifier.fillMaxWidth(),
numberOfSteps = numberStep,
currentStep = currentStep,
stepDescriptionList = titleList,
selectedColor = Color.Blue,
unSelectedColor= Color.LightGray
)
Stepper(
modifier = Modifier.fillMaxWidth(),
numberOfSteps = numberStep,
currentStep = currentStep,
stepDescriptionList = titleList,
isRainbow = true
)
For more info go to Stepper using JetPack Compose
- Current version of the library needs targetSdk 33.
Give a ⭐️ if this project helped you!