Closed Alex-Dobrynin closed 2 years ago
I presume you are using PinchGestureRecognizer? I'd propose to set IsUserInteractionEnabled = "False" when the pinch is started and set "True" back when it's finished.
nope, i dont use PinchGestureRecognizer, because android's webview has it's own zoom functionalty as well as ios's scrollview
for android i fixed this way
Ah, I see... let me think about it a bit
Probably the fix should be applied somewhere here: https://github.com/AndreiMisiukevich/CardView/blob/master/PanCardView.iOS/CardsViewRenderer.cs#L167
Can you try to use the pinch gesture for iOS and somehow "pass" zoom to zoomable scroll view?
Unfortunately, now I have pretty limited time :(
Also, you can try to hacky ways of achieving that
e.g. disable user interaction by setting "IsUserInteractionEnabled=False", add your own PanGestureRecognizer and pass events to the carousel using this method https://github.com/AndreiMisiukevich/CardView/blob/master/PanCardView/CardsView.cs#L587 only when it's needed
e.g. (Zoom started means you should ignore pan)
I know this is a hacky way, but uh... Not sure how to fix that
will try ios first
UPD: on ios it works out of box. just need to be fixed on android But i noticed another bug on ios, if CarouselView lays within scrollview and I trying to pan through CarouselView vertically, scrollview does not move
UPD: Ok, it is not obvious, but I should add PanCardView.iOS.CardsViewRenderer.Preserve(); to AppDelegate to make it work
UPD: Ok, it is not obvious, but I should add PanCardView.iOS.CardsViewRenderer.Preserve(); to AppDelegate to make it work
It's in the setup section here https://github.com/AndreiMisiukevich/CardView#Setup
This is some xamarin linker bug, unfortunately, can't work around it with the existing architecture approach (without switching to multiplatform project)
Oh, Yeah, now I see. I'm sorry
no worries.
if you wish, feel free to submit a PR with this property
Or we can consider this as closed, if you think it's ok now.
Closing this issue as the workaround was found. Please use it.
In my case I have your's carousel view with zoomable webview on android and zoomable scroll view on ios as datatemplates. When user trying to zoom, your's carouselview catches those gestures and swipes to next/previos view