Home

Awesome

StepView

introduce

StepView is extracted from the software developed by my company and do the reinforcement, divided into horizontal and vertical version, color size freely adjustable, flexible to use!

中文版在这里

UI

Download Demo

1 2

How to use

Gradle

compile 'com.xyz.step:step:1.0.4'

Maven

<dependency>
  <groupId>com.xyz.step</groupId>
  <artifactId>step</artifactId>
  <version>1.0.4</version>
  <type>pom</type>
</dependency>

Horizontal View

Attribute is introduced

AttributeDescribeTypeDefault valueWhether must
h_bg_radiusBackground circle radiusdimension5No
h_pro_radiusHas completed the radius of the circlesdimension2No
h_bg_widthBackground line widthdimension3No
h_bg_colorBackground Colorcolor#cdcbccNo
h_pro_widthThe width of the line has been completeddimension2No
h_pro_colorThe completed colorcolor#029dd5No
h_text_paddingText and distance of the circledimension10No
h_time_paddingTime and distance of the circledimension15No
h_max_stepTotal stepsint5No
h_pro_stepStep has been completedint1No
h_textsizetextsizedimension10No

layout

<com.xyz.step.FlowViewHorizontal
        android:id="@+id/hflowview4"
        android:layout_width="match_parent"
        android:layout_height="80dp"
        android:paddingLeft="30dp"
        app:h_bg_radius="6dp"
        app:h_bg_width='4dp'
        app:h_pro_radius='4dp'
        app:h_pro_width="2dp"
        app:h_text_padding='10dp'
        app:h_textsize='10dp'
        app:h_time_padding='17dp' />

Code

    /**
     * Progress Settings
     * @param progress  Have completed a few steps
     * @param maxStep  Total steps
     * @param titles   	    Step name
     * @param times      Every step of the completion time
     */
    public void setProgress(int progress, int maxStep, String[] titles, String[] times);
    
    /**
     * Color Settings
     * @param map <text,color>
     */
    public void setKeyColor(Map<String, String> map);

Vertical View

Attribute is introduced

AttributeDescribeTypeDefault valueWhether must
v_bg_radiusBackground circle radiusdimension5No
v_pro_radiusHas completed the radius of the circledimension2No
v_bg_widthBackground line widthdimension3No
v_bg_colorBackground Colorcolor#cdcbccNo
v_pro_widthThe width of the line has been completeddimension2No
v_pro_colorThe completed colorcolor#029dd5No
v_intervalintervaldimension80No
v_bgPositionXIn a horizontal positiondimension100No
v_textPaddingLeftThe distance of text and linesdimension10No
v_timePaddingRightThe distance of time and linesdimension15No
v_max_stepTotal stepsint5No
v_pro_stepStep has been completedint1No
v_textsizeText sizedimension10No
v_textMoveTopThe text on the vertical distancedimension5No
v_timeMoveTopThe time on the vertical distancedimension4No

layout

<com.xyz.step.FlowViewVertical
        android:id="@+id/vflow"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingBottom="10dp"
        android:paddingRight="10dp"
        android:paddingTop="10dp"
        app:v_bgPositionX="40dp"
        app:v_bg_color="#029dd5"
        app:v_bg_radius="8dp"
        app:v_bg_width="4dp"
        app:v_interval="80dp"
        app:v_max_step="10"
        app:v_pro_color="#cdcbcc"
        app:v_pro_radius="8dp"
        app:v_pro_step="9"
        app:v_pro_width="4dp"
        app:v_textMoveTop="7dp"
        app:v_textsize="14dp" />

Code

    /**
     * Progress Settings
     * @param progress Have completed a few steps
     * @param maxStep  Total steps
     * @param titles    Step description
     * @param times    Time description
     */
    public void setProgress(int progress, int maxStep, String[] titles, String[] times);
    
    
    /**
     *  Color Settings
     * @param map <text,color>
     */
    public void setKeyColor(Map<String, String> map);
    

Use attention

###All directions

Transverse

###Vertical

LICENSE 开源协议

Apache License Version 2.0