sequence-layout
A vertical sequence UI component for Android.
Animates a progress bar to the first active step in the sequence and then periodically runs a pulse animation on that step.
Setup
Add the JitPack maven repository to your root build.gradle
:
And then the actual library dependency to your module's build.gradle
:
Usage
Take a look at the sample
app in this repository.
In XML layout
You can define steps in your XML layout:
Custom attributes for SequenceLayout
:
Attribute | Description |
---|---|
progressForegroundColor |
foreground color of the progress bar |
progressBackgroundColor |
background color of the progress bar |
Custom attributes for SequenceStep
:
Attribute | Description |
---|---|
active |
boolean to indicate if step is active. There should only be one active step per SequenceLayout . |
anchor |
text for the left side of the step |
anchorTextAppearance |
styling for the left side of the step |
title |
title of the step |
titleTextAppearance |
styling for the title of the step |
subtitle |
subtitle of the step |
subtitleTextAppearance |
styling for the subtitle of the step |
Programmatically
Alternatively, define an adapter that extends SequenceAdapter<T>
, like this:
... and use it for a SequenceLayout
: