-
Notifications
You must be signed in to change notification settings - Fork 67
chore: enable edge-to-edge display by default and add script to disab… #1103
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
Closed
karahanharunn
wants to merge
1
commit into
release/14.x.x
from
moo/moo-2104/disable-edge-to-edge-10.24
Closed
Changes from all commits
Commits
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 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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Script to update Android styles.xml and remove react-native-edge-to-edge package | ||
| # Usage: ./update-styles-and-remove-edge-to-edge.sh | ||
|
|
||
| set -e # Exit on error | ||
|
|
||
| echo "======================================" | ||
| echo "Updating Android Styles & Removing Edge-to-Edge Package" | ||
| echo "======================================" | ||
|
|
||
| # Define the styles.xml path | ||
| STYLES_FILE="android/app/src/main/res/values/styles.xml" | ||
|
|
||
| # Check if styles.xml exists | ||
| if [ ! -f "$STYLES_FILE" ]; then | ||
| echo "Error: $STYLES_FILE not found!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Step 1: Updating styles.xml..." | ||
| cat > "$STYLES_FILE" << 'EOF' | ||
| <resources> | ||
|
|
||
| <!-- Base light application theme. --> | ||
| <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> | ||
| <!-- Customize your theme here. --> | ||
| <item name="android:windowDisablePreview">true</item> | ||
| <item name="android:windowIsTranslucent">true</item> | ||
| <item name="android:editTextStyle">@style/MendixEditText</item> | ||
| <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item> | ||
| </style> | ||
| <!-- Base dark application theme. --> | ||
| <style name="AppTheme_Dark" parent="Theme.AppCompat.DayNight.NoActionBar"> | ||
| <!-- Customize your theme here. --> | ||
| <item name="android:windowDisablePreview">true</item> | ||
| <item name="android:windowIsTranslucent">true</item> | ||
| <item name="android:editTextStyle">@style/MendixEditText</item> | ||
| <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item> | ||
| </style> | ||
|
|
||
|
|
||
| <style name="MendixEditText" parent="Widget.AppCompat.EditText"> | ||
| <item name="android:background">@android:color/transparent</item> | ||
| </style> | ||
|
|
||
| </resources> | ||
| EOF | ||
| echo "✓ styles.xml updated successfully" | ||
|
|
||
| echo "" | ||
| echo "Step 2: Updating gradle.properties..." | ||
| GRADLE_PROPERTIES="android/gradle.properties" | ||
| if [ -f "$GRADLE_PROPERTIES" ]; then | ||
| if grep -q "edgeToEdgeEnabled=true" "$GRADLE_PROPERTIES"; then | ||
| sed -i.bak 's/edgeToEdgeEnabled=true/edgeToEdgeEnabled=false/g' "$GRADLE_PROPERTIES" | ||
| rm "${GRADLE_PROPERTIES}.bak" | ||
| echo "✓ gradle.properties updated (edgeToEdgeEnabled=false)" | ||
| else | ||
| echo "⚠ edgeToEdgeEnabled=true not found in gradle.properties" | ||
| fi | ||
| else | ||
| echo "⚠ $GRADLE_PROPERTIES not found, skipping" | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "Step 3: Removing react-native-edge-to-edge package..." | ||
| if [ -f "package.json" ]; then | ||
| if grep -q '"react-native-edge-to-edge"' package.json; then | ||
| npm uninstall react-native-edge-to-edge | ||
| echo "✓ react-native-edge-to-edge package removed successfully" | ||
| else | ||
| echo "⚠ react-native-edge-to-edge package not found in package.json" | ||
| fi | ||
| else | ||
| echo "Error: package.json not found!" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "" | ||
| echo "======================================" | ||
| echo "✓ All tasks completed successfully!" | ||
| echo "======================================" | ||
| echo "" | ||
| echo "Summary:" | ||
| echo " - styles.xml updated" | ||
| echo " - gradle.properties updated (edgeToEdgeEnabled=false)" | ||
| echo " - react-native-edge-to-edge package removed" | ||
| echo "" |
Oops, something went wrong.
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.
Edge to edge is always enabled on Android 16+ so I think it's worth mentioning in the release notes as well.