New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Add Platform Specific features for setting TabbedPage swipe paging and OffscreenPageLimit #409

Merged
merged 3 commits into from Oct 20, 2016

Conversation

Projects
None yet
7 participants
@pauldipietro
Member

pauldipietro commented Oct 1, 2016

Description of Change

There is an issue where some horizontal swipe gestures can get picked up by the TabbedPage in AppCompat. The bug filed used a drawable canvas as an example. By adding a Platform Specific feature for setting the paging functionality, this behavior can be easily adjusted to fit the individual user's needs.

swipe

Bugs Fixed

https://bugzilla.xamarin.com/show_bug.cgi?id=44044

API Changes

Added:

  • public static readonly BindableProperty IsSwipePagingEnabledProperty
  • public static bool GetIsSwipePagingEnabled(BindableObject element)
  • public static bool IsSwipePagingEnabled(this IPlatformElementConfiguration<Android, FormsElement> config)
  • public static IPlatformElementConfiguration<Android, FormsElement> SetIsSwipePagingEnabled(this IPlatformElementConfiguration<Android, FormsElement> config, bool value)
  • public static IPlatformElementConfiguration<Android, FormsElement> EnableSwipePaging(this IPlatformElementConfiguration<Android, FormsElement> config)
  • public static IPlatformElementConfiguration<Android, FormsElement> DisableSwipePaging(this IPlatformElementConfiguration<Android, FormsElement> config)

Behavioral Changes

None

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@dnfclas dnfclas added the cla-required label Oct 1, 2016

@adrianknight89

This comment has been minimized.

Show comment
Hide comment
@adrianknight89

adrianknight89 Oct 1, 2016

Contributor

Good add. A similar behavior can probably be added to UWP tab control since it too has scrollable content.

Contributor

adrianknight89 commented Oct 1, 2016

Good add. A similar behavior can probably be added to UWP tab control since it too has scrollable content.

@samhouts

Need to update docs.

@StephaneDelcroix

While you are at it (TabbedPage android specifics), can you add a property for setting the number of cached pages in the viewPager. It defaults to 3, iirc. The property is OffScreenPageLimit.

@pauldipietro

This comment has been minimized.

Show comment
Hide comment
@pauldipietro

pauldipietro Oct 7, 2016

Member

@StephaneDelcroix we could do that as a separate PR maybe? I need to do some rebasing on this when I get a chance (and I probably want to add something to the PlatformSpecificsGallery since I noticed it exists while doing another for iOS).

Member

pauldipietro commented Oct 7, 2016

@StephaneDelcroix we could do that as a separate PR maybe? I need to do some rebasing on this when I get a chance (and I probably want to add something to the PlatformSpecificsGallery since I noticed it exists while doing another for iOS).

@pauldipietro

This comment has been minimized.

Show comment
Hide comment
@pauldipietro

pauldipietro Oct 10, 2016

Member

Added in the OffscreenPageLimit stuff in this PR (only applies to AppCompat) along with a TabbedPage in the gallery -- maybe want to remove the issues repro (Bugzilla44044.cs) since it's a bit redundant.

Member

pauldipietro commented Oct 10, 2016

Added in the OffscreenPageLimit stuff in this PR (only applies to AppCompat) along with a TabbedPage in the gallery -- maybe want to remove the issues repro (Bugzilla44044.cs) since it's a bit redundant.

@pauldipietro pauldipietro changed the title from [Android] Add Platform Specific feature for setting TabbedPage swipe paging to [Android] Add Platform Specific feature for setting TabbedPage swipe paging; OffscreenPageLimit Oct 10, 2016

@pauldipietro pauldipietro changed the title from [Android] Add Platform Specific feature for setting TabbedPage swipe paging; OffscreenPageLimit to [Android] Add Platform Specific features for setting TabbedPage swipe paging and OffscreenPageLimit Oct 10, 2016

@rmarinho

This comment has been minimized.

Show comment
Hide comment
@rmarinho

rmarinho Oct 11, 2016

Member

Needs rebase and update docs

Member

rmarinho commented Oct 11, 2016

Needs rebase and update docs

@pauldipietro pauldipietro merged commit 4042f39 into master Oct 20, 2016

@samhouts samhouts deleted the fix-bugzilla44044 branch Oct 20, 2016

@Sebastian1989101

This comment has been minimized.

Show comment
Hide comment
@Sebastian1989101

Sebastian1989101 Apr 12, 2017

How can I use this? What is the requirement? I'm using Xamarin.Fomrs 2.3.4.224 and don't have any of there properties on my TabbedPage.

Edit: NVM - there is source code - found it ^^

Sebastian1989101 commented Apr 12, 2017

How can I use this? What is the requirement? I'm using Xamarin.Fomrs 2.3.4.224 and don't have any of there properties on my TabbedPage.

Edit: NVM - there is source code - found it ^^

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment