Giter Site home page Giter Site logo

Zoom WebView about cardview HOT 12 CLOSED

Alex-Dobrynin avatar Alex-Dobrynin commented on June 2, 2024
Zoom WebView

from cardview.

Comments (12)

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

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.

from cardview.

Alex-Dobrynin avatar Alex-Dobrynin commented on June 2, 2024

nope, i dont use PinchGestureRecognizer, because android's webview has it's own zoom functionalty as well as ios's scrollview

image
for android i fixed this way

from cardview.

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

Ah, I see... let me think about it a bit

from cardview.

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

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 :(

from cardview.

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

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

from cardview.

Alex-Dobrynin avatar Alex-Dobrynin commented on June 2, 2024

will try ios first

from cardview.

Alex-Dobrynin avatar Alex-Dobrynin commented on June 2, 2024

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

from cardview.

Alex-Dobrynin avatar Alex-Dobrynin commented on June 2, 2024

UPD: Ok, it is not obvious, but I should add PanCardView.iOS.CardsViewRenderer.Preserve(); to AppDelegate to make it work

from cardview.

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

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)

from cardview.

Alex-Dobrynin avatar Alex-Dobrynin commented on June 2, 2024

Oh, Yeah, now I see. I'm sorry

from cardview.

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

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.

from cardview.

AndreiMisiukevich avatar AndreiMisiukevich commented on June 2, 2024

Closing this issue as the workaround was found. Please use it.

from cardview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.