Skip to content

Setting Dimensions

Kofi Gyan edited this page Sep 13, 2016 · 4 revisions

You can change the dimension of the state , state number , state line and state description

State Size :

XML

  • spb_stateSize

Example :

 <com.kofigyan.stateprogressbar.StateProgressBar
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     app:spb_stateSize="40dp"/> 

Related Method

  • setStateSize(float)

Example :

........................... 
...........................

StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateSize(40f);

State Number(Text) Size :

XML

  • spb_stateTextSize

Example :

 <com.kofigyan.stateprogressbar.StateProgressBar
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     app:spb_stateTextSize="15sp"/> 

Related Method

  • setStateNumberTextSize(float)

Example :

........................... 
...........................

StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateNumberTextSize(20f);

State Line Size(Line Thickness) :

XML

  • spb_stateLineThickness

Example :

 <com.kofigyan.stateprogressbar.StateProgressBar
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     app:spb_stateLineThickness="10dp"/> 

Related Method

  • setStateLineThickness(float)

Example :

........................... 
...........................

StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateLineThickness(10f);

State Description Size :

XML

  • spb_stateDescriptionSize

Example :

<com.kofigyan.stateprogressbar.StateProgressBar
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     app:spb_stateDescriptionSize="20sp"/> 

Related Method

  • setStateDescriptionSize(float)

Example :

........................... 
...........................

StateProgressBar stateProgressBar = (StateProgressBar) findViewById(R.id.your_state_progress_bar_id);
stateProgressBar.setStateDescriptionSize(18f);