-
Notifications
You must be signed in to change notification settings - Fork 235
Setting State Number
Kofi Gyan edited this page Sep 13, 2016
·
4 revisions
You can set the current state number and the maximum state number for every stateprogressbar. The minimum state number you can set is one
and the maximum state number you can set is four. Current state number cannot be greater than maximum state number. ie.
1 ≤ current state number ≤ 4 ,
1 ≤ maximum state number ≤ 4 and
current state number ≤ maximum state number
NB// Throws IllegalStateException if current state number > maximum state number
- spb_maxStateNumber
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_maxStateNumber="four"/>
- setMaxStateNumber(StateNumber)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setMaxStateNumber(StateNumber.FOUR);
- spb_currentStateNumber
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_currentStateNumber="one"/>
- setCurrentStateNumber(StateNumber)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setCurrentStateNumber(StateNumber.ONE);