Skip to content

Commit a158142

Browse files
committed
* set default color for indicator for better debugging
* updated support libraries version
1 parent 4ef13c1 commit a158142

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.library'
22

33
android {
44
compileSdkVersion 24
5-
buildToolsVersion "24.0.2"
5+
buildToolsVersion "24.0.3"
66

77
defaultConfig {
88
minSdkVersion 14

lib/src/main/java/com/cleveroad/slidingtutorial/TutorialPageIndicator.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ public final class TutorialPageIndicator extends View implements TutorialImpl.In
4747
static final int DEFAULT_VALUE = 0;
4848
static final int NO_COLOR = 1;
4949
@ColorInt
50-
static final int DEFAULT_COLOR = Color.TRANSPARENT;
50+
static final int DEFAULT_COLOR = Color.RED;
5151

52-
private RectF mClipBounds;
53-
private RectF mElementBounds;
52+
private final RectF mClipBounds = new RectF();
53+
private final RectF mElementBounds = new RectF();
5454
private float mScrolledOffset;
5555
private int mSelectedPosition;
5656
private float mIndicatorElementSpacing;
5757
private float mIndicatorElementSize;
58-
private Paint mIndicatorSelectedPaint;
59-
private Paint mIndicatorPaint;
58+
private final Paint mIndicatorSelectedPaint = new Paint();
59+
private final Paint mIndicatorPaint = new Paint();
6060
private Renderer mRenderer;
6161
private int mPagesCount;
6262
private boolean mIsInfiniteScroll;
@@ -79,10 +79,6 @@ public TutorialPageIndicator(Context context, AttributeSet attrs, int defStyleAt
7979
}
8080

8181
void initWith(@NonNull IndicatorOptions indicatorOptions, int pagesCount) {
82-
mElementBounds = new RectF();
83-
mClipBounds = new RectF();
84-
85-
mIndicatorPaint = new Paint();
8682
mIndicatorPaint.setAntiAlias(true);
8783
int elementColor;
8884
if (indicatorOptions.getElementColor() != NO_COLOR) {
@@ -92,7 +88,6 @@ void initWith(@NonNull IndicatorOptions indicatorOptions, int pagesCount) {
9288
}
9389
mIndicatorPaint.setColor(elementColor);
9490

95-
mIndicatorSelectedPaint = new Paint();
9691
mIndicatorSelectedPaint.setAntiAlias(true);
9792
int selectedElementColor;
9893
if (indicatorOptions.getSelectedElementColor() != NO_COLOR) {

sample/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'com.android.application'
22

33
android {
44
compileSdkVersion 24
5-
buildToolsVersion "23.0.3"
5+
buildToolsVersion "24.0.3"
66

77
defaultConfig {
88
applicationId "com.cleveroad.tutorialsample"
@@ -25,7 +25,7 @@ android {
2525
dependencies {
2626
compile fileTree(include: ['*.jar'], dir: 'libs')
2727
testCompile 'junit:junit:4.12'
28-
compile 'com.android.support:appcompat-v7:24.2.0'
29-
compile 'com.android.support:percent:24.2.0'
28+
compile 'com.android.support:appcompat-v7:24.2.1'
29+
compile 'com.android.support:percent:24.2.1'
3030
compile project(':lib')
3131
}

0 commit comments

Comments
 (0)