Skip to content

Commit

Permalink
Updated Readme.md , gradle and screenshots.
Browse files Browse the repository at this point in the history
Released version 1.4.5
  • Loading branch information
krazykira committed Feb 11, 2019
1 parent a106e5c commit 37142be
Show file tree
Hide file tree
Showing 9 changed files with 66 additions and 33 deletions.
87 changes: 60 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ It is similar to an enhanced SeekBar widget, though it doesn't make use of the S

Supported on API Level 12 and above for animations.

![Img](https://github.com/oli107/material-range-bar/blob/master/Screenshots/pin%20expand.gif)
![Img](https://github.com/oli107/material-range-bar/blob/master/Screenshots/materialrangebar_demo.gif)

Developers can customize the following attributes (both via XML and programatically):

### Change Log
```
1.4.5 - Added TOP and BOTTOM tick labels properties and drag only option. Also updated Gradle and screenshots.
1.4.4 - Added List of colors for connecting line and fix pins invisibility issue.
1.4.3 - Fixes an issue where you user was able to drag a thumb outside of the valid range of Rangebar.
1.4.2 - Added option for rounding status Bar progress using mrb_rangeBar_rounded. Also Implemented seekbar to select the nearest tick, when clicked. Also Fixed Rangebar issue that was causing right pin to move left of left pin when both had same value.
Expand All @@ -38,6 +39,16 @@ mrb_tickHeight | dimension
mrb_tickColor | color
```

### Tick Label Properties
```
mrb_tickLabelColor | reference or color // Unselected label color
mrb_tickLabelSelectedColor | reference or color // Selected Label Color
mrb_tickTopLabels | reference (String array)
mrb_tickBottomLabels | reference (String array)
mrb_tickDefaultLabel | reference or string // Used in cases when top/bottom labels are not equal to number of ticks
mrb_tickLabelSize | dimension (sp)
```

### Bar Properties
```
mrb_rangeBar | boolean
Expand All @@ -48,6 +59,7 @@ mrb_rangeBar_rounded | boolean
mrb_temporaryPins | boolean
mrb_connectingLineWeight | dimension
mrb_connectingLineColor | reference (array of hex colors)
mrb_onlyOnDrag | boolean
```

### Pin Properties
Expand Down Expand Up @@ -84,50 +96,70 @@ Examples

This is a rangebar with both a lower and upper value
```xml
<com.appyvet.materialrangebar.RangeBar
<com.appyvet.materialrangebar.RangeBar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/rangebar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mrb_rangeBar="true"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
app:mrb_pinMaxFont="15sp"
app:mrb_pinMinFont="12sp"
app:mrb_rangeBarPaddingBottom="20dp"
app:mrb_rangeBarPaddingBottom="30dp"
app:mrb_selectorBoundaryColor="@color/accent"
app:mrb_selectorBoundarySize="2dp"
app:mrb_pinTextColor="@color/white"
app:mrb_temporaryPins="true"
app:mrb_selectorSize="10dp"
app:mrb_tickLabelColor="@color/indigo500"
app:mrb_tickLabelSelectedColor="@color/accent"
app:mrb_tickBottomLabels="@array/ticks_labels"
app:mrb_tickTopLabels="@array/ticks_labels"
app:mrb_tickDefaultLabel="label"
app:mrb_tickLabelSize="4sp"
app:mrb_tickEnd="10"
app:mrb_tickInterval="1"
app:mrb_tickStart="5"
app:mrb_tickHeight="4dp"
app:mrb_pinRadius="14dp"
app:mrb_rangeBar_rounded="true"
app:mrb_connectingLineColors="@array/connecting_colors"
app:mrb_rangeBar="true"
app:mrb_pinColor="#6c3f6a"/>
```

This is a seekbar with only a single pin (note mrb_rangeBar=false)
```xml
<com.appyvet.materialrangebar.RangeBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:mrb_rangeBar="false"
app:mrb_pinMaxFont="15sp"
app:mrb_pinMinFont="12sp"
app:mrb_rangeBarPaddingBottom="20dp"
app:mrb_selectorBoundaryColor="@color/accent"
app:mrb_selectorBoundarySize="2dp"
app:mrb_pinTextColor="@color/white"
app:mrb_temporaryPins="true"
app:mrb_selectorSize="10dp"
app:mrb_tickEnd="10"
app:mrb_tickInterval="1"
app:mrb_tickStart="5"
app:mrb_pinRadius="14dp"
app:mrb_rangeBar_rounded="true"
app:mrb_connectingLineColors="@array/connecting_colors"
app:mrb_pinColor="#6c3f6a"/>
<com.appyvet.materialrangebar.RangeBar
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/rangebar1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="40dp"
android:layout_marginEnd="40dp"
app:mrb_pinMaxFont="15sp"
app:mrb_pinMinFont="12sp"
app:mrb_rangeBarPaddingBottom="30dp"
app:mrb_selectorBoundaryColor="@color/accent"
app:mrb_selectorBoundarySize="2dp"
app:mrb_pinTextColor="@color/white"
app:mrb_temporaryPins="true"
app:mrb_selectorSize="10dp"
app:mrb_tickLabelColor="@color/indigo500"
app:mrb_tickLabelSelectedColor="@color/accent"
app:mrb_tickBottomLabels="@array/ticks_labels"
app:mrb_tickTopLabels="@array/ticks_labels"
app:mrb_tickDefaultLabel="label"
app:mrb_tickLabelSize="4sp"
app:mrb_tickEnd="10"
app:mrb_tickInterval="1"
app:mrb_tickStart="5"
app:mrb_tickHeight="4dp"
app:mrb_pinRadius="14dp"
app:mrb_rangeBar_rounded="true"
app:mrb_connectingLineColors="@array/connecting_colors"
app:mrb_rangeBar="false"
app:mrb_pinColor="#6c3f6a"/>
```

## Adding a rangebar listener
Expand Down Expand Up @@ -182,24 +214,25 @@ allprojects {

```groovy
dependencies {
implementation 'com.appyvet:materialrangebar:1.4.4'
implementation 'com.appyvet:materialrangebar:1.4.5'
}
```


**if you are already using android support library inside your project and run into multiple version issues related to android support library then modify the gradle path like this**
```groovy
dependencies {
compile ('com.appyvet:materialrangebar:1.4.4') {
compile ('com.appyvet:materialrangebar:1.4.5') {
exclude module: 'support-compat'
}
}
```

Contribution
=======
You are always welcome to contribute and help us mantain the library.

We don't have enough time to constantly answer the issues and handle updates. So we need all the help we can get.
You are always welcome to contribute and help us maintain the library.
For Moderator Access create an issue on Github and tag oli107.

License
=======
Expand Down
4 changes: 2 additions & 2 deletions RangeBarSample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ apply plugin: 'com.android.application'

dependencies {
implementation project(':materialrangebar')
// implementation 'com.appyvet:materialrangebar:1.4.4'
// implementation 'com.appyvet:materialrangebar:1.4.5'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:support-compat:28.0.0'
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.2'
buildToolsVersion '28.0.3'

defaultConfig {
minSdkVersion 14
Expand Down
Binary file added Screenshots/materialrangebar_demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Screenshots/pin expand.gif
Binary file not shown.
Binary file removed Screenshots/screenshot pin active.png
Binary file not shown.
Binary file modified Screenshots/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:3.3.1'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.1.1"
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 02 12:32:09 CEST 2018
#Mon Feb 11 11:25:27 CET 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
2 changes: 1 addition & 1 deletion materialrangebar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ext {
siteUrl = 'https://github.com/oli107/material-range-bar'
gitUrl = 'https://github.com/oli107/material-range-bar.git'

libraryVersion = '1.4.4'
libraryVersion = '1.4.5'

developerId = 'krazykira'
developerName = 'Sheraz Ahmed Khilji'
Expand Down

0 comments on commit 37142be

Please sign in to comment.