-
Notifications
You must be signed in to change notification settings - Fork 236
Setting Colors
Kofi Gyan edited this page Sep 13, 2016
·
20 revisions
Set colors for state background , state foreground , state number background , state number foreground , state decription color , current state description color.
- spb_stateBackgroundColor
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_stateBackgroundColor="#BDBDBD"/>
- setBackgroundColor(int)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setBackgroundColor(ContextCompat.getColor(this, android.R.color.darker_gray));
-
spb_stateForegroundColor
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_stateForegroundColor="#009688"/>
- setForegroundColor(int)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setForegroundColor(ContextCompat.getColor(this, R.color.demo_state_foreground_color));
-
spb_stateNumberBackgroundColor
Example :
<com.kofigyan.stateprogressbar.StateProgressBar android:layout_width="wrap_content" android:layout_height="wrap_content" app:spb_stateNumberBackgroundColor="#808080"/>
- setStateNumberBackgroundColor(int)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateNumberBackgroundColor(ContextCompat.getColor(this, android.R.color.background_dark));
-
spb_stateNumberForegroundColor
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_stateNumberForegroundColor="#eeeeee"/>
- setStateNumberForegroundColor(int)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateNumberForegroundColor(ContextCompat.getColor(this, android.R.color.white));
-
spb_stateDescriptionColor
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_stateDescriptionColor="#808080"/>
- setStateDescriptionColor(int)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateDescriptionColor(ContextCompat.getColor(this, R.color.description_background_color));
-
spb_currentStateDescriptionColor
Example :
<com.kofigyan.stateprogressbar.StateProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:spb_currentStateDescriptionColor="#009688"/>
- setCurrentStateDescriptionColor(int)
Example :
...........................
...........................
StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setCurrentStateDescriptionColor(ContextCompat.getColor(this, R.color.description_foreground_color));