From 40958026e5d3335c1b6ca59767e594a59466242f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Thu, 12 Dec 2024 17:20:54 +0100 Subject: [PATCH 1/3] feat: add react-native-edge-to-edge --- apps/example/app.json | 3 +++ apps/example/package.json | 1 + yarn.lock | 11 +++++++++++ 3 files changed, 15 insertions(+) diff --git a/apps/example/app.json b/apps/example/app.json index 7e7d79b..88ffbe8 100644 --- a/apps/example/app.json +++ b/apps/example/app.json @@ -9,6 +9,9 @@ "slug": "bottomtabs-example" } ], + "plugins": [ + ["react-native-edge-to-edge", {"android": {"parentTheme": "Material3"}}] + ], "resources": { "android": [ "dist/res", diff --git a/apps/example/package.json b/apps/example/package.json index c5acd0c..a271ca5 100644 --- a/apps/example/package.json +++ b/apps/example/package.json @@ -26,6 +26,7 @@ "react": "18.3.1", "react-native": "0.75.4", "react-native-bottom-tabs": "*", + "react-native-edge-to-edge": "^1.1.3", "react-native-gesture-handler": "^2.21.2", "react-native-macos": "^0.75.0", "react-native-paper": "^5.12.5", diff --git a/yarn.lock b/yarn.lock index 22dd5e1..0e39e01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15591,6 +15591,7 @@ __metadata: react-native: 0.75.4 react-native-bottom-tabs: "*" react-native-builder-bob: ^0.30.2 + react-native-edge-to-edge: ^1.1.3 react-native-gesture-handler: ^2.21.2 react-native-macos: ^0.75.0 react-native-paper: ^5.12.5 @@ -15686,6 +15687,16 @@ __metadata: languageName: node linkType: hard +"react-native-edge-to-edge@npm:^1.1.3": + version: 1.1.3 + resolution: "react-native-edge-to-edge@npm:1.1.3" + peerDependencies: + react: ">=18.2.0" + react-native: ">=0.73.0" + checksum: 712c4cab722640dee0153fe7ba5663cb34a3a30310a9e3792678ac2b58b9cf6acd1677a2cdd73b63aeca3bfa99e5fb6f18cded7752f52ed3aa0eea120e39916d + languageName: node + linkType: hard + "react-native-gesture-handler@npm:2.21.2, react-native-gesture-handler@npm:^2.21.2": version: 2.21.2 resolution: "react-native-gesture-handler@npm:2.21.2" From 55af7f63e3749286ff3887a96033962a049ee03a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwas=CC=81niewski?= Date: Thu, 12 Dec 2024 17:21:15 +0100 Subject: [PATCH 2/3] fix: update tint colors after updating items --- apps/example/src/App.tsx | 1 - .../src/main/java/com/rcttabview/RCTTabView.kt | 17 +++++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/example/src/App.tsx b/apps/example/src/App.tsx index a5bebb5..b724fb2 100644 --- a/apps/example/src/App.tsx +++ b/apps/example/src/App.tsx @@ -10,7 +10,6 @@ import { TouchableOpacity, Button, Alert, - useColorScheme, Platform, } from 'react-native'; import { NavigationContainer, useNavigation } from '@react-navigation/native'; diff --git a/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt b/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt index 5d9ac20..1ffdff5 100644 --- a/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt +++ b/packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt @@ -138,6 +138,7 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context } } updateTextAppearance() + updateTintColors() } } } @@ -171,12 +172,16 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context } fun setLabeled(labeled: Boolean?) { - labelVisibilityMode = if (labeled == false) { - LABEL_VISIBILITY_UNLABELED - } else if (labeled == true) { - LABEL_VISIBILITY_LABELED - } else { - LABEL_VISIBILITY_AUTO + labelVisibilityMode = when (labeled) { + false -> { + LABEL_VISIBILITY_UNLABELED + } + true -> { + LABEL_VISIBILITY_LABELED + } + else -> { + LABEL_VISIBILITY_AUTO + } } } From 829a9d3cbf062dcb904e5bdb8d92ba24cab5c2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oskar=20Kwa=C5=9Bniewski?= Date: Thu, 12 Dec 2024 17:22:46 +0100 Subject: [PATCH 3/3] Create rude-ants-heal.md --- .changeset/rude-ants-heal.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rude-ants-heal.md diff --git a/.changeset/rude-ants-heal.md b/.changeset/rude-ants-heal.md new file mode 100644 index 0000000..7666773 --- /dev/null +++ b/.changeset/rude-ants-heal.md @@ -0,0 +1,5 @@ +--- +"react-native-bottom-tabs": patch +--- + +fix: update tint colors after updating items