Skip to content

Commit

Permalink
Flip instead of rotating it when reversed (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico authored Jan 29, 2021
1 parent e1185de commit 0e2ca7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,10 @@ class SlideToActView @JvmOverloads constructor(
// We compute the rotation of the arrow and we apply .rotate transformation on the canvas.
canvas.save()
if (isReversed) {
canvas.rotate(180f, mInnerRect.centerX(), mInnerRect.centerY())
canvas.scale(-1F, 1F, mInnerRect.centerX(), mInnerRect.centerY())
}
if (isRotateIcon) {
mArrowAngle = 180 * mPositionPerc * (if (isReversed) 1 else -1)
mArrowAngle = -180 * mPositionPerc
canvas.rotate(mArrowAngle, mInnerRect.centerX(), mInnerRect.centerY())
}
mDrawableArrow.setBounds(
Expand Down

0 comments on commit 0e2ca7d

Please sign in to comment.