Skip to content

Commit

Permalink
Don't call getThumbTintList for API < 21 - Fix rubensousa#4
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensousa committed Feb 7, 2017
1 parent 27c93b1 commit b978bc2
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ public void setTintColorResource(@ColorRes int color) {
}
}

@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void setupColors() {
ColorStateList list = seekBar.getThumbTintList();
if (list != null) {
tintColor = list.getDefaultColor();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ColorStateList list = seekBar.getThumbTintList();
if (list != null) {
tintColor = list.getDefaultColor();
}
}
setTintColor(tintColor);
}
Expand Down

0 comments on commit b978bc2

Please sign in to comment.