Clipping is missing
Petr019 opened this issue · 2 comments
Petr019 commented
Hello,
try to use the component with dark background. The left and right icons and texts are displayed partially over the swiped item.
Fix: Add rectangle clipping e.g.:
if ( swipeRightBackgroundColor != 0 ) {
final ColorDrawable background = new ColorDrawable(swipeRightBackgroundColor);
canvas.clipRect(viewHolder.itemView.getLeft(), viewHolder.itemView.getTop(), viewHolder.itemView.getLeft() + (int) dX, viewHolder.itemView.getBottom());
background.setBounds(viewHolder.itemView.getLeft(), viewHolder.itemView.getTop(), viewHolder.itemView.getLeft() + (int) dX, viewHolder.itemView.getBottom());
background.draw(canvas);
}
xabaras commented
Thanks, I'll have a look at that.
xabaras commented
Just fixed the issue. I'm releasing a new version in minutes