Try fix nav bar foreground color

This commit is contained in:
ryan 2025-06-21 15:00:07 -07:00
parent cbd50a811a
commit 7201889c2a
3 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<resources xmlns:tools="http://schemas.android.com/tools"> <resources xmlns:tools="http://schemas.android.com/tools">
<style name="AppTheme" parent="Theme.EdgeToEdge"> <style name="AppTheme" parent="Theme.EdgeToEdge.Light">
<item name="android:editTextBackground">@drawable/rn_edit_text_material</item> <item name="android:editTextBackground">@drawable/rn_edit_text_material</item>
<item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimary">@color/colorPrimary</item>
<item name="enforceNavigationBarContrast">false</item> <item name="enforceNavigationBarContrast">false</item>

View File

@ -36,6 +36,7 @@ module.exports = {
"react-native-edge-to-edge", "react-native-edge-to-edge",
{ {
"android": { "android": {
"parentTheme": "Light",
"enforceNavigationBarContrast": false "enforceNavigationBarContrast": false
} }
} }

View File

@ -83,10 +83,7 @@ export default function RootLayout() {
useEffect(() => { useEffect(() => {
if (Platform.OS === 'android') { if (Platform.OS === 'android') {
const backgroundColor = theme.colors.primary; NavigationBar.setStyle('inverted');
const foregroundColor = colorScheme === 'dark' ? 'light' : 'dark';
NavigationBar.setStyle('light');
} }
}, [colorScheme]); }, [colorScheme]);