Skip to content

Commit

Permalink
[TIMOB-26168] Fix unsupported RippleDrawable on Android 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Jul 3, 2018
1 parent efdeb8e commit ec9ee69
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1181,9 +1181,11 @@ private void applyTouchFeedback(@NonNull Integer backgroundColor, @Nullable Inte
throw new RuntimeException("android.R.attr.colorControlHighlight cannot be resolved into Drawable");
}
}
RippleDrawable rippleDrawable =
new RippleDrawable(ColorStateList.valueOf(rippleColor), new ColorDrawable(backgroundColor), null);
nativeView.setBackground(rippleDrawable);
if (Build.VERSION.SDK_INT >= 21) {
RippleDrawable rippleDrawable =
new RippleDrawable(ColorStateList.valueOf(rippleColor), new ColorDrawable(backgroundColor), null);
nativeView.setBackground(rippleDrawable);
}
}

@Override
Expand Down

0 comments on commit ec9ee69

Please sign in to comment.