Skip to content

Commit 77d3bee

Browse files
committed
Correct 'background' style loading. Closes JakeWharton#135.
1 parent 980fb11 commit 77d3bee

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Change Log
22
==========
33

4+
Version 2.4.1 *(In Development)*
5+
--------------------------------
6+
7+
* Fix: `TitlePageIndicator`, `LinePageIndicator`, and `UnderlinePageIndicator`
8+
support of `android:background`.
9+
10+
411
Version 2.4.0 *(2012-09-06)*
512
----------------------------
613

library/src/com/viewpagerindicator/LinePageIndicator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public LinePageIndicator(Context context, AttributeSet attrs, int defStyle) {
8686
mPaintUnselected.setColor(a.getColor(R.styleable.LinePageIndicator_unselectedColor, defaultUnselectedColor));
8787
mPaintSelected.setColor(a.getColor(R.styleable.LinePageIndicator_selectedColor, defaultSelectedColor));
8888

89-
Drawable background = a.getDrawable(R.styleable.CirclePageIndicator_android_background);
89+
Drawable background = a.getDrawable(R.styleable.LinePageIndicator_android_background);
9090
if (background != null) {
9191
setBackgroundDrawable(background);
9292
}

library/src/com/viewpagerindicator/TitlePageIndicator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public TitlePageIndicator(Context context, AttributeSet attrs, int defStyle) {
204204
mPaintFooterIndicator.setStyle(Paint.Style.FILL_AND_STROKE);
205205
mPaintFooterIndicator.setColor(footerColor);
206206

207-
Drawable background = a.getDrawable(R.styleable.CirclePageIndicator_android_background);
207+
Drawable background = a.getDrawable(R.styleable.TitlePageIndicator_android_background);
208208
if (background != null) {
209209
setBackgroundDrawable(background);
210210
}

library/src/com/viewpagerindicator/UnderlinePageIndicator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public UnderlinePageIndicator(Context context, AttributeSet attrs, int defStyle)
9898
setFadeDelay(a.getInteger(R.styleable.UnderlinePageIndicator_fadeDelay, defaultFadeDelay));
9999
setFadeLength(a.getInteger(R.styleable.UnderlinePageIndicator_fadeLength, defaultFadeLength));
100100

101-
Drawable background = a.getDrawable(R.styleable.CirclePageIndicator_android_background);
101+
Drawable background = a.getDrawable(R.styleable.UnderlinePageIndicator_android_background);
102102
if (background != null) {
103103
setBackgroundDrawable(background);
104104
}

0 commit comments

Comments
 (0)