-
Notifications
You must be signed in to change notification settings - Fork 586
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
feat(android): Android 12 Splash Screen API #1011
Conversation
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
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.
Added a few comments.
Also I think there is something wrong with the README, there are some style changes that shouldn't be there.
If I run npm run build
it undoes most of the changes, can you run it too and see if it undoes the changes?
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
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.
Added a few comments.
Also, all the configuration options that won't work on the new splash should include a note that says something like "Does't work in Android 12+ devices or if using Android 12 Splash Screen API" or similar messaging.
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Show resolved
Hide resolved
splash-screen/android/src/main/java/com/capacitorjs/plugins/splashscreen/SplashScreen.java
Outdated
Show resolved
Hide resolved
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.
When using this configuration:
"plugins": {
"SplashScreen": {
"launchAutoHide": true,
"launchShowDuration": 7000
}
}
Then when I call Show with auto hide or Show and then Hide after a timeout, the splash never disappears.
Adding onPreDrawListener = null;
on line 142 seems to fix the issue, but there might be another way.
… dialog dismissal
Hi, I have a question: to avoid the stretched image in Android 11 (#459), the only solution would be to modify the style.xml file in the Android project? Thank you very much in advance. |
This PR adds support for the optional usage of the Android 12 Splash Screen API.
closes #459
closes #561