-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix splash screen logo size jump on Samsung OneUI v4 #28644
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f788f2e
Add isSamsungOneUI4 method
zoontek 30eb8d7
Move bootsplash logo from mipmap to drawable
zoontek c202b22
Apply custom bootsplash layout for Samsung OneUI 4
zoontek 6ca78e6
Add logoSizeRatio constant
zoontek 357d7b6
Apply logo size ratio on splash screen logo
zoontek 4daaf3b
Fix splash screen logo svg file
zoontek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
18 changes: 18 additions & 0 deletions
18
android/app/src/main/res/drawable/bootsplash_samsung_oneui_4.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:opacity="opaque"> | ||
<item android:gravity="fill"> | ||
<color android:color="?attr/windowSplashScreenBackground" /> | ||
</item> | ||
|
||
<!-- There's an issue with logo size on Samsung OneUI v4 | ||
We need to render it 2 times smaller (288 / 2 = 144) --> | ||
<item | ||
tools:ignore="UnusedAttribute" | ||
android:drawable="?windowSplashScreenAnimatedIcon" | ||
android:gravity="center" | ||
android:width="144dp" | ||
android:height="144dp" /> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,7 +72,7 @@ | |
|
||
<style name="BootTheme" parent="Theme.SplashScreen"> | ||
<item name="android:statusBarColor">@android:color/transparent</item> | ||
<item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item> | ||
<item name="windowSplashScreenAnimatedIcon">@drawable/bootsplash_logo</item> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I moved the bootsplash logo from |
||
<item name="windowSplashScreenBackground">@color/bootsplash_background</item> | ||
</style> | ||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I understand not wanting to bundle this in the library, but just curious if you thought about this?
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.
I will apply the same in
react-native-bootsplash
in a upcoming version.This is not pretty, but it's extracted from a Samsung APK so it should be correct, and we unfortunately need it 😕
I have a similar method in
react-native-localize
for Xiaomi devices. I always rather use a workaround than let users reporting issues, as they don't know that it's their phone Android implementation fault.I often wish Google enforce Android stock usage (without any modifications) to manufacturers, but it's a wild dream 😅
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.
Okay, that's great. Can you let us know when this is ready so that we can update our code?
As an ex-native Android dev I 100% agree.
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.
@Julesssss Yes, I will. The module in Expensify is based on my initial work on v5, but has been merged way before I released the latest version (as I added support for brand image, dark mode, web, in this release)
Once bootsplash catch up on this, I will do a proposal to migrate Expensify back to it (and delete the custom module in your codebase). I know that light / dark mode support is planned on your side + you will be able to remove your web custom implementation.
Meanwhile, I'd rather be able to merge and check that this indeed fix the Samsung issue (as I don't have such test devices)