Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## Fixes

- We have upgraded `@mendix/native` to version 9.0.1
- We have enabled edge-to-edge display by default. If you encounter compatibility issues, you can disable it by running `npm run disable-edge-to-edge`

Copy link
Copy Markdown
Collaborator

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.


## [14.0.0] - 2025-04-01

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"private": true,
"scripts": {
"postinstall": "node patches/apply-patches.js && jetify",
"configure": "native-mobile-toolkit configure --config-path='./config.json' --verbose"
"configure": "native-mobile-toolkit configure --config-path='./config.json' --verbose",
"disable-edge-to-edge": "bash scripts/disable-edge-to-edge.sh"
},
"dependencies": {
"@gorhom/bottom-sheet": "^5.1.1",
Expand Down
90 changes: 90 additions & 0 deletions scripts/disable-edge-to-edge.sh
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 ""
Loading