Android targetSdk 35 update - Add Android only padding to account for lack of SafeAreaView#94
Closed
alanleedev wants to merge 2 commits intoreact-native-community:mainfrom
Closed
Conversation
…rgetSdk 35. This is to avoid importing react-native-safe-area-context library which is the recommended approach but omitting here to reduce external dependency.
alanleedev
commented
Jan 9, 2025
| contentInsetAdjustmentBehavior="automatic" | ||
| style={backgroundStyle}> | ||
| <Header /> | ||
| <View style={{paddingRight: hackyPadding}}> |
Collaborator
Author
There was a problem hiding this comment.
right padding for RN version indicator
alanleedev
commented
Jan 9, 2025
| <View | ||
| style={{ | ||
| backgroundColor: isDarkMode ? Colors.black : Colors.white, | ||
| paddingHorizontal: hackyPadding, |
Collaborator
Author
There was a problem hiding this comment.
left, right padding for content within ScrollView
alanleedev
commented
Jan 9, 2025
| style={{ | ||
| backgroundColor: isDarkMode ? Colors.black : Colors.white, | ||
| paddingHorizontal: hackyPadding, | ||
| paddingBottom: hackyPadding, |
Collaborator
Author
There was a problem hiding this comment.
bottom padding to prevent content overlap with button nav bar
Collaborator
|
@cipolleschi can you make a call on this? @alanleedev I'm away atm. |
Contributor
|
See #95, I prefer the other approach, although this is a bit more conservative. |
Member
Collaborator
Author
|
Closing in favor of PR #95 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
Updating to targetSdk 35 on Android enforces edge-to-edge on Android 15+.
We decided not to use
react-native-safe-area-contextin the template (PR #84 ) to reduce external dependency although it is the current recommendation handling forced edge-to-edge.To account for UI overlap, we are using a magic padding value for Android in the template.
iOS still uses SafeAreaView and remain unaffected.
Changelog:
[ANDROID][CHANGED] - update targetSdk to 35 which will enforce edge-to-edge on Android 15+
Test Plan:
ios_safeareaview.mp4
ios_safeareaview_land.mp4
android_hacky_padding.mp4
android_hacky_padding_land.mp4