Skip to content
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

Expose when setNavigationRoot is called on RootPresenter #7586

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zzorba
Copy link
Contributor

@zzorba zzorba commented Aug 21, 2022

This change exposes when setNavigationRoot is called by the javascript application on the RootPresenter class.

This is needed to implement the new Android 12 style splash screen (discussion here: #7363), so that the screen can persist until the application is ready to show real content.

@stale
Copy link

stale bot commented Oct 8, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the 🏚 stale label Oct 8, 2022
@zzorba
Copy link
Contributor Author

zzorba commented Oct 8, 2022

Not stale, still very relevant for anyone wanting to implement the new splash screen behavior from Android 12

@zzorba
Copy link
Contributor Author

zzorba commented Nov 30, 2022

Just wondering if this might be able to get in soon. It's needed to support the new Android 11 style splash screen, which has been out for some time now.

@fiznool
Copy link
Contributor

fiznool commented Mar 1, 2023

Another vote for having this merged in. Support for Android 12 splashscreens would be awesome, and this is currently blocking that effort.

@marcshilling
Copy link

Throwing my vote in here as well. I've applied these changes via patch-package and they are working to allow to me to use the new SplashScreen API on Android.

@VisibleForTesting
public RootPresenter(RootAnimator animator, LayoutDirectionApplier layoutDirectionApplier) {
this.animator = animator;
this.layoutDirectionApplier = layoutDirectionApplier;
}

public void setRoot(ViewController appearingRoot, ViewController<?> disappearingRoot, Options defaultOptions, CommandListener listener, ReactInstanceManager reactInstanceManager) {
setRootCalled = true;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to move this into animateSetRootAndReportSuccess, right before the listener.onSuccess calls. And you'll need 2 lines of it, one in each block.

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

Successfully merging this pull request may close these issues.

None yet

4 participants