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 App Compat] Can opt out of sending Appearing/Disappearing events on Resume/Pause #450

Merged
merged 5 commits into from Oct 12, 2016

Conversation

Projects
None yet
5 participants
@samhouts
Member

samhouts commented Oct 12, 2016

Description of Change

Added Platform Specific feature to Android AppCompat that will allow users to disable Appearing and/or Disappearing events on Resume and Pause, respectively. Disabling these events will make the AppCompat event cycle match the pre-AppCompat event cycle. Events are enabled by default to preserve existing behavior for apps that rely on the events.

Users can disable the events using the following code:

using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.PlatformConfiguration.AndroidSpecific.AppCompat;

...

Application.Current.On<Android>()
                            .SendDisappearingEventOnPause(false)
                            .SendAppearingEventOnResume(false);

There is a manual test for this.

Bugs Fixed

API Changes

Added:

  • namespace Xamarin.Forms.PlatformConfiguration.AndroidSpecific.AppCompat
  • Application.Current.On<Android>.SendAppearingEventOnResume()
  • Application.Current.On<Android>.SendDisappearingEventOnPause()

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

samhouts added some commits Oct 11, 2016

[Core] Add Android AppCompat PS props ...
... to disable sending Disappearing/Appearing events on Pause/Resume
respectively.
@adrianknight89

This comment has been minimized.

Show comment
Hide comment
@adrianknight89

adrianknight89 Oct 12, 2016

Contributor

This is actually pretty cool. I could disable this feature and match the behavior to iOS. I raised a bug recently that concerns content pages as root (https://bugzilla.xamarin.com/show_bug.cgi?id=44855). When the fix is in place, it should be aware of this option.

Contributor

adrianknight89 commented Oct 12, 2016

This is actually pretty cool. I could disable this feature and match the behavior to iOS. I raised a bug recently that concerns content pages as root (https://bugzilla.xamarin.com/show_bug.cgi?id=44855). When the fix is in place, it should be aware of this option.

@jassmith jassmith merged commit d16f355 into master Oct 12, 2016

2 of 5 checks passed

Android-UITests Started TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1
Details
iOS10-UITests Started TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10
Details
iOS9-UITests Started TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: Windows Debug : Tests passed: 3458, ignored: 8
Details

@samhouts samhouts deleted the fix-bugzilla40722 branch Oct 12, 2016

@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