Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
guy-4444 committed Jun 6, 2018
2 parents b58f235 + f3c0281 commit be2df31
Showing 1 changed file with 35 additions and 26 deletions.
61 changes: 35 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# StepLineIndicator

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/vlad1m1r990/Lemniscate/blob/master/LICENSE)
[![](https://jitpack.io/v/arbelkilani/BiColored-Progress.svg)](https://jitpack.io/#arbelkilani/Compass-View)
[![API](https://img.shields.io/badge/API-19%2B-green.svg?style=flat)]()
[![](https://jitpack.io/v/guy-4444/StepLineIndicator.svg)](https://jitpack.io/#guy-4444/StepLineIndicator)
[![API](https://img.shields.io/badge/API-21%2B-green.svg?style=flat)]()

Vertical and horizontal step line indicator.


![device-2018-06-06-143847](https://user-images.githubusercontent.com/35038142/41036090-90498556-6997-11e8-98f1-0074f143f53e.png)
![device-2018-06-06-144912](https://user-images.githubusercontent.com/35038142/41039463-2bf1ce0a-69a2-11e8-963a-3e0259757565.png)


## Setup
Add it in your root build.gradle at the end of repositories:
Expand All @@ -23,51 +24,59 @@ Step 2. Add the dependency:

```
dependencies {
implementation 'com.github.guy-4444:StepLineIndicator:1.01.01'
implementation 'com.github.guy-4444:StepLineIndicator:1.02.01'
}
```
## Usage

###### StepView Constructor:
```java
TimeLineLayout timeLayout_1 = (TimeLineLayout)findViewById(R.id.timeLayout_1);
timeLayout_1.setTimeLines(this, TimelineView.LineOrientation.HORIZONTAL, 5, R.color.colorPrimary, android.R.color.darker_gray);
StepLineLayout stepLayout_1 = (StepLineLayout)findViewById(R.id.timeLayout_1);
stepLayout_1.setStepLines(this, SteplineView.LineOrientation.HORIZONTAL, 5, R.color.colorPrimary, android.R.color.darker_gray);

// or:
TimeLineLayout timeLayout_1 = (TimeLineLayout)findViewById(R.id.timeLayout_1);
timeLayout_1.setTimeLines(this, TimelineView.LineOrientation.HORIZONTAL, 7, R.color.colorPrimary, android.R.color.darker_gray, R.color.colorPrimary);
StepLineLayout stepLayout_1 = (StepLineLayout)findViewById(R.id.stepLayout_1);
stepLayout_1.setStepLines(this, SteplineView.LineOrientation.HORIZONTAL, 7, R.color.colorPrimary, android.R.color.darker_gray, R.color.colorPrimary);

// or:
TimeLineLayout timeLayout_2 = (TimeLineLayout)findViewById(R.id.timeLayout_2);
timeLayout_2.setTimeLines(this, TimelineView.LineOrientation.VERTICAL, 12, Color.argb(123, 0, 0, 255), android.R.color.darker_gray, android.R.color.darker_gray, 3, 20, 10);
StepLineLayout stepLayout_2 = (StepLineLayout)findViewById(R.id.stepLayout_2);
stepLayout_2.setStepLines(this, SteplineView.LineOrientation.VERTICAL, 12, Color.argb(123, 0, 0, 255), android.R.color.darker_gray, android.R.color.darker_gray, 3, 20, 10);

// or:
TimeLineLayout timeLayout_3 = (TimeLineLayout)findViewById(R.id.timeLayout_3);
timeLayout_2.setTimeLines(this, TimelineView.LineOrientation.VERTICAL, 12, Color.argb(123, 0, 0, 255), android.R.color.darker_gray, android.R.color.darker_gray, 3, 20, 10);
StepLineLayout stepLayout_3 = (StepLineLayout)findViewById(R.id.stepLayout_3);
stepLayout_2.setStepLines(this, SteplineView.LineOrientation.VERTICAL, 12, Color.argb(123, 0, 0, 255), android.R.color.darker_gray, android.R.color.darker_gray, 3, 20, 10);

// or:
TimeLineLayout timeLayout_4 = (TimeLineLayout)findViewById(R.id.timeLayout_4);
timeLayout_4.setTimeLines(this, TimelineView.LineOrientation.VERTICAL, 60, Color.argb(123, 0, 0, 255), android.R.color.darker_gray, android.R.color.darker_gray, 2, 17, 0);
StepLineLayout stepLayout_4 = (StepLineLayout)findViewById(R.id.stepLayout_4);
stepLayout_4.setStepLines(this, SteplineView.LineOrientation.VERTICAL, 60, Color.argb(123, 0, 0, 255), android.R.color.darker_gray, android.R.color.darker_gray, 2, 17, 0);

```

###### StepView Constructor parameters:

Context context
LineOrientation _lineOrientation - TimelineView.LineOrientation.VERTICAL or TimelineView.LineOrientation.HORIZONTAL
int _numOfItems
int _mainColor - color of completed items
int _secondColor - color of uncompleted items
int _lineColor - color of lines between items
int _lineSize - 0 is without lines
int _markerRadius - size of items
int _linePadding - 0 is without space between lines to itemes
**Context context**

**LineOrientation** _lineOrientation - SteplineView.LineOrientation.VERTICAL or SteplineView.LineOrientation.HORIZONTAL

**int _numOfItems**

**int _mainColor** - color of completed items

**int _secondColor** - color of uncompleted items

**int _lineColor** - color of lines between items

**int _lineSize** - 0 is without lines

**int _markerRadius** - size of items

**int _linePadding** - 0 is without space between lines to items

###### StepView Control ways:
```java
timeLayout_1.setUnitCompleted(0);
timeLayout_1.setUnitInactive(1);
timeLayout_1.setUnitActive(2);
stepLayout_1.setUnitCompleted(0);
stepLayout_1.setUnitInactive(1);
stepLayout_1.setUnitActive(2);
```
## Credits

Expand Down

0 comments on commit be2df31

Please sign in to comment.