Skip to content

Commit

Permalink
enhancement #50
Browse files Browse the repository at this point in the history
  • Loading branch information
whilu committed Apr 9, 2017
1 parent d0aa391 commit 4c72ba2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,12 @@ private void drawCross(Canvas canvas){
@TargetApi(Build.VERSION_CODES.HONEYCOMB)
private void drawRipple(Canvas canvas){
if (isViewClickable && Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && canvas != null){

// Disable hardware acceleration for 'Canvas.clipPath()' when running on API from 11 to 17
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2){
setLayerType(LAYER_TYPE_SOFTWARE, null);
}

canvas.save();
mPath.reset();

Expand Down

0 comments on commit 4c72ba2

Please sign in to comment.