Skip to content

Commit 2526db9

Browse files
authored
fix: update tint colors after updating items (#195)
* feat: add react-native-edge-to-edge * fix: update tint colors after updating items * Create rude-ants-heal.md
1 parent dc5ebe7 commit 2526db9

File tree

6 files changed

+31
-7
lines changed

6 files changed

+31
-7
lines changed

.changeset/rude-ants-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-native-bottom-tabs": patch
3+
---
4+
5+
fix: update tint colors after updating items

apps/example/app.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
"slug": "bottomtabs-example"
1010
}
1111
],
12+
"plugins": [
13+
["react-native-edge-to-edge", {"android": {"parentTheme": "Material3"}}]
14+
],
1215
"resources": {
1316
"android": [
1417
"dist/res",

apps/example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"react": "18.3.1",
2727
"react-native": "0.75.4",
2828
"react-native-bottom-tabs": "*",
29+
"react-native-edge-to-edge": "^1.1.3",
2930
"react-native-gesture-handler": "^2.21.2",
3031
"react-native-macos": "^0.75.0",
3132
"react-native-paper": "^5.12.5",

apps/example/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
TouchableOpacity,
1111
Button,
1212
Alert,
13-
useColorScheme,
1413
Platform,
1514
} from 'react-native';
1615
import { NavigationContainer, useNavigation } from '@react-navigation/native';

packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview/RCTTabView.kt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context
138138
}
139139
}
140140
updateTextAppearance()
141+
updateTintColors()
141142
}
142143
}
143144
}
@@ -171,12 +172,16 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context
171172
}
172173

173174
fun setLabeled(labeled: Boolean?) {
174-
labelVisibilityMode = if (labeled == false) {
175-
LABEL_VISIBILITY_UNLABELED
176-
} else if (labeled == true) {
177-
LABEL_VISIBILITY_LABELED
178-
} else {
179-
LABEL_VISIBILITY_AUTO
175+
labelVisibilityMode = when (labeled) {
176+
false -> {
177+
LABEL_VISIBILITY_UNLABELED
178+
}
179+
true -> {
180+
LABEL_VISIBILITY_LABELED
181+
}
182+
else -> {
183+
LABEL_VISIBILITY_AUTO
184+
}
180185
}
181186
}
182187

yarn.lock

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15591,6 +15591,7 @@ __metadata:
1559115591
react-native: 0.75.4
1559215592
react-native-bottom-tabs: "*"
1559315593
react-native-builder-bob: ^0.30.2
15594+
react-native-edge-to-edge: ^1.1.3
1559415595
react-native-gesture-handler: ^2.21.2
1559515596
react-native-macos: ^0.75.0
1559615597
react-native-paper: ^5.12.5
@@ -15686,6 +15687,16 @@ __metadata:
1568615687
languageName: node
1568715688
linkType: hard
1568815689

15690+
"react-native-edge-to-edge@npm:^1.1.3":
15691+
version: 1.1.3
15692+
resolution: "react-native-edge-to-edge@npm:1.1.3"
15693+
peerDependencies:
15694+
react: ">=18.2.0"
15695+
react-native: ">=0.73.0"
15696+
checksum: 712c4cab722640dee0153fe7ba5663cb34a3a30310a9e3792678ac2b58b9cf6acd1677a2cdd73b63aeca3bfa99e5fb6f18cded7752f52ed3aa0eea120e39916d
15697+
languageName: node
15698+
linkType: hard
15699+
1568915700
"react-native-gesture-handler@npm:2.21.2, react-native-gesture-handler@npm:^2.21.2":
1569015701
version: 2.21.2
1569115702
resolution: "react-native-gesture-handler@npm:2.21.2"

0 commit comments

Comments
 (0)