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

react-native-edge-to-edge #28

Merged
merged 45 commits into from
Oct 11, 2024
Merged

react-native-edge-to-edge #28

merged 45 commits into from
Oct 11, 2024

Conversation

zoontek
Copy link
Owner

@zoontek zoontek commented Jul 22, 2024

No description provided.

@zoontek zoontek changed the title v3 react-native-edge-to-edge Sep 5, 2024
@jpudysz
Copy link

jpudysz commented Sep 5, 2024

For me it would be perfect to get following metadata (from Android/C++):

  • current insets
  • isStatusBarHidden
  • isNavigationBarHidden

or reliable isEdgeToEdge so I can compute insets by myself.

Ofc I can do it by myself, but Im also facing a lot of edge cases. So single API for all would be the best!

android/build.gradle Outdated Show resolved Hide resolved
Copy link

@TheRogue76 TheRogue76 left a comment

Choose a reason for hiding this comment

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

Dope stuff as usual! Left some thoughts. Hope they help

<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
<style name="Theme.EdgeToEdge" parent="Theme.EdgeToEdge.Common">
<item name="android:navigationBarColor">@color/systemBarDarkScrim</item>
Copy link

Choose a reason for hiding this comment

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

I would like to suggest adding a variant with Theme.AppCompat.Light.NoActionBar theme, as not all applications that have to be created are designed to support dark theme and dynamic switching.

Copy link

Choose a reason for hiding this comment

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

Something like this

Theme.EdgeToEdge - default (current implementation)
Theme.EdgeToEdge.Light - will be using Theme.AppCompat.Light.NoActionBar theme under the hood

Copy link

@alanjhughes alanjhughes left a comment

Choose a reason for hiding this comment

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

Looks good @zoontek

@@ -39,8 +41,8 @@ android {
}
defaultConfig {
buildConfigField("boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString())
minSdkVersion safeExtGet("minSdkVersion", 21)
targetSdkVersion safeExtGet("targetSdkVersion", 33)
minSdkVersion safeExtGet("minSdkVersion", 23)

Choose a reason for hiding this comment

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

Heads up, 0.76 will have a minSdkVersion of 24

Copy link
Owner Author

Choose a reason for hiding this comment

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

@alanjhughes This library is compatible with RN 0.73+, that's why I keep minSdkVersion to 23 for now.

@zoontek zoontek marked this pull request as ready for review October 11, 2024 13:35
@zoontek zoontek merged commit 8cdfab2 into main Oct 11, 2024
1 check passed
@zoontek zoontek deleted the v3 branch October 11, 2024 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants