Closed leroygumede closed 6 years ago
I am glad you like it.
The code piece from HandleTouch method:
if (Math.Abs((int)this.cardDistance) > this.CardMoveDistance)
{
if (this.cardDistance > this.CardMoveDistance)
{
topCard.BackgroundColor = Color.FromHex(SwipeRightBackgroundColor);
}
else
{
topCard.BackgroundColor = Color.FromHex(SwipeLeftBackgroundColor);
}
}
else
{
topCard.BackgroundColor = Color.FromHex(DefaultCardBackgroundColor);
}
While you are moving card HandleTouch method is being invoked many times. Whenever HandleTouch is invoked I check how much card has moved horizontally. If it passes the limit, I update the background color.
Awesome. I was using the Nuget but looks like I'll have to switch SwipeCardView Class provided in your sample code to access it . Thanks again for the quick reply :)
Hey,
Less of a issue and more of a question but how did you make the card change colour when swiping between left and right , I went through your code but found no reference of it . Great plugin 👍