diff --git a/README.md b/README.md
index 4865106..29600cf 100644
--- a/README.md
+++ b/README.md
@@ -12,17 +12,19 @@ repositories {
}
dependencies {
- compile 'com.github.waynell:VideoRangeSlider:1.0'
+ compile 'com.github.waynell:VideoRangeSlider:1.0.1'
}
```
## Usage
-1. Add VideoRangeSlider into your layout
+1. Add VideoRangeSlider into your layout, like the following
```xml
mThumbWidth) {
- canvas.drawRect(mThumbWidth, 0, lThumbOffset, height, mBgPaint);
+ canvas.drawRect(mThumbWidth, 0, lThumbOffset + mThumbWidth, height, mBgPaint);
}
if (rThumbOffset < width - mThumbWidth) {
canvas.drawRect(rThumbOffset, 0, width, height, mBgPaint);
@@ -280,31 +280,16 @@ public void setRangeChangeListener(OnRangeChangeListener rangeChangeListener) {
}
/**
- * Sets the start tick in the RangeSlider.
- *
- * @param tickInterval Integer specifying the number of ticks.
- */
- public void setTickInterval(int tickInterval) {
- int tickCount = (mTickEnd - mTickStart) / tickInterval;
- if (isValidTickCount(tickCount)) {
- mTickCount = tickCount;
- mTickInterval = tickInterval;
- } else {
- throw new IllegalArgumentException("tickCount less than 2; invalid tickCount.");
- }
- }
-
- /**
- * Sets the end tick in the RangeSlider.
+ * Sets the tick count in the RangeSlider.
*
- * @param tickEnd Integer specifying the number of ticks.
+ * @param count Integer specifying the number of ticks.
*/
- public void setTickEnd(int tickEnd) {
- int tickCount = (tickEnd - mTickStart) / mTickInterval;
+ public void setTickCount(int count) {
+ int tickCount = (count - mTickStart) / mTickInterval;
if (isValidTickCount(tickCount)) {
- mTickEnd = tickEnd;
+ mTickEnd = count;
mTickCount = tickCount;
- mRightThumb.setTickIndex(mTickEnd);
+ mRightThumb.setTickIndex(mTickCount);
} else {
throw new IllegalArgumentException("tickCount less than 2; invalid tickCount.");
}
diff --git a/video-range-slider/src/main/java/com/waynell/videorangeslider/ThumbView.java b/video-range-slider/src/main/java/com/waynell/videorangeslider/ThumbView.java
index ec809ad..2372704 100644
--- a/video-range-slider/src/main/java/com/waynell/videorangeslider/ThumbView.java
+++ b/video-range-slider/src/main/java/com/waynell/videorangeslider/ThumbView.java
@@ -14,7 +14,7 @@
@SuppressLint("ViewConstructor")
class ThumbView extends View {
- private static final int EXTEND_TOUCH_SLOP = 10;
+ private static final int EXTEND_TOUCH_SLOP = 15;
private final int mExtendTouchSlop;
diff --git a/video-range-slider/src/main/res/values/attrs.xml b/video-range-slider/src/main/res/values/attrs.xml
index d234df8..14e9b80 100644
--- a/video-range-slider/src/main/res/values/attrs.xml
+++ b/video-range-slider/src/main/res/values/attrs.xml
@@ -1,10 +1,13 @@
-
+
+
+
+