Cardview: Swiping if Pangesture is not enabled

Created on 23 Sep 2019  路  21Comments  路  Source: AndreiMisiukevich/CardView

Hey Andrei,
until version 2.16 it was possible to swipe the carousel view even if pangesture was set to false.
I need to set it to false on some views since I show a web view where the user can zoom in, it was still possible to swipe if the user starts at the very left or right end of the screen.
This is not possible anymore atm.
Is this expected behaviour ? Can I achieve the fuctionality otherwise ?
Do you have any hints ?

enhancement resolved

All 21 comments

Can you provide a small sample?

So, 2.1.5 works fine, but 2.1.6 - not?

I try to provide it the next days!
2.16 is working, afterwards not

@shoeIT ah, got it)

Did it work on iOS and Android ?? or Android only?

Hmmm, I presume you tested on Android only, yeah?

yes until now I tested only on Android. iOS update ATM therefore I can try it later or tomorrow!

@shoeIT I am sure, that it was an "unexpected" "android-specific" behavior.
Yeah, check some versions on iOS please, but I am sure that it has been never working on iOS (because it shouldn't)

in iOS everything works out of the box exactly like I want and as it worked until 216 in Android with pangesture = false

I mean, what is the expected behaviour if you show a svg in a webview. The should be able to zoom into the web view and the user should still be able to swipe?
In Android atm you could either swipe or zoom but not both of it...I don't think that what we want?

@shoeIT makes sense

pangesture = false // could you pls explain it? Is it IsPanInteractionEnabled ?

Well, it would be fantastic, if you forked my project and applied a sample there :)
It will allow me to fix this issue ASAP. I believe I know what is the reason.

So, you used it like:

carousel.IsPanInteractionEnabled = Device.RuntimePlatform != Device.Android;

Yeah?

thank's for your support, I try to provide a sample asap!

I use data binding and on a certain position if

 if (Device.RuntimePlatform == Device.Android)
                                        {                                          
                                            PanGestureEnabled = false;
                                        }

then I'm able to zoom in the webview containing a svg.

    <cards:CarouselView
                     BackgroundColor="White"
                     HorizontalOptions="FillAndExpand"                                           
                     VerticalOptions="FillAndExpand"
                     VerticalSwipeThresholdDistance="3000"
                    ItemsSource="{Binding CarouselViewInputItems}"          
                                            IsPanInteractionEnabled ="{Binding PanGestureEnabled}"
                   x:Name="WoICarouselCards"                 
                   AreAnimationsEnabled="True"
                       IsUserInteractionInCourse="False"
                            UserInteracted="UserInteracted"
            IsCyclical ="False"
        SelectedIndex="{Binding Position, Mode=TwoWay}" >

@shoeIT I added one new property. So I will create new release today

ShouldThrottlePanInteraction = true

v2.2.2

THX works fine so far.
PanGestureEnable = true
ShouldTrhottlePanInteractions = true IF you need to zoom in and out or scroll on a View (e.g. WebView)

@shoeIT thanks for the feedback :D

Was this page helpful?
0 / 5 - 0 ratings

Related issues

EldinHb picture EldinHb  路  8Comments

shoeIT picture shoeIT  路  6Comments

LuisM000 picture LuisM000  路  3Comments

jungjanos picture jungjanos  路  8Comments

stealthcold picture stealthcold  路  6Comments