-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
base: master
Are you sure you want to change the base?
Conversation
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. |
Not stale, still very relevant for anyone wanting to implement the new splash screen behavior from Android 12 |
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. |
Another vote for having this merged in. Support for Android 12 splashscreens would be awesome, and this is currently blocking that effort. |
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; |
There was a problem hiding this comment.
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.
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.