You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice library, thank you very much.
I'm using it with two image views.
Depending on a fling motion, the user is able to turn the image vertically (if swiping up or down) or horizontally (if swiping horizontally).
The type (from front or back, left or right) is changed accordingly.
This motion may be repeated as often as the user likes on the same.
A problem occurs, if a user swipes vertically and then horizontally (or vice versa).
Here's a little POC to show what I mean.
// the flip view flips on touch
findViewById<EasyFlipView>(R.id.flip_view).run {
setToHorizontalType()
// first click: everything is fine
setOnFlipListener { _, _ ->
setToVerticalType()
// second click: mirrored image view, correct animation
setOnFlipListener { _, _ ->
setToHorizontalType()
setOnClickListener(null)
// third click: mirrored image view changes back (is now correct), wrong animation
// following clicks: wrong animations but correct image views
}
}
}
This most probably has got something to do with the animations.
When you 'flip' the image view, it's being mirrored which doesn't matter if you mirror it back along the same axis.
But as soon as you mix vertical and horizontal mirroring, everything breaks.
Manually mirroring the image views via getChildAt(1).scaleY = -1f would probably be possible.
Nevertheless I think it would be best to keep track of these changes within the library.
I've hacked my way around the issue by stacking two flip views over one another and dynamically showing/hiding them.
One is used for vertical and the other one for horizontal flips.
This is dirty and I'm wondering, whether you've ever encountered this problem or use case.
The text was updated successfully, but these errors were encountered:
Nice library, thank you very much.
I'm using it with two image views.
Depending on a fling motion, the user is able to turn the image vertically (if swiping up or down) or horizontally (if swiping horizontally).
The type (from front or back, left or right) is changed accordingly.
This motion may be repeated as often as the user likes on the same.
A problem occurs, if a user swipes vertically and then horizontally (or vice versa).
Here's a little POC to show what I mean.
This most probably has got something to do with the animations.
When you 'flip' the image view, it's being mirrored which doesn't matter if you mirror it back along the same axis.
But as soon as you mix vertical and horizontal mirroring, everything breaks.
Manually mirroring the image views via
getChildAt(1).scaleY = -1f
would probably be possible.Nevertheless I think it would be best to keep track of these changes within the library.
I've hacked my way around the issue by stacking two flip views over one another and dynamically showing/hiding them.
One is used for vertical and the other one for horizontal flips.
This is dirty and I'm wondering, whether you've ever encountered this problem or use case.
The text was updated successfully, but these errors were encountered: