Skip to content

v2.0

Latest
Compare
Choose a tag to compare
@vinaygopinath vinaygopinath released this 09 Jun 17:23
· 2 commits to master since this release

Refactored baoyachi's StepView to use better code inheritance, a cleaner data structure applicable for both HorizontalStepView and VerticalStepView and Javadoc for all publicly available methods.

Quick intro/migration guide to the lib:

  1. Include HorizontalStepView or VerticalStepView in your layout XML
<com.vinay.stepview.HorizontalStepView
    android:id="@+id/horizontal_step_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
	
<!-- OR -->

<com.vinay.stepview.VerticalStepView
    android:id="@+id/vertical_step_view"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"/>
  1. Create a list of steps
List<Step> stepList = new ArrayList<Step>();
stepList.add(new Step("Step title goes here", State.CURRENT);
stepList.add(new Step("Step title goes here", State.NOT_COMPLETED);

mStepView.setSteps(stepList);
  1. Change step state as the user navigates/completes steps.
mStepView.setStepState(Step.State.COMPLETED, 0); // Marks the first step as completed
mStepView.setStepState(Step.State.CURRENT, 1); // Marks the second step as current

The demo app is available here as an APK and on the Play Store