Skip to content
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

fix: update tint colors after updating items #195

Merged
merged 3 commits into from
Dec 12, 2024
Merged
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
5 changes: 5 additions & 0 deletions .changeset/rude-ants-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-native-bottom-tabs": patch
---

fix: update tint colors after updating items
3 changes: 3 additions & 0 deletions apps/example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"slug": "bottomtabs-example"
}
],
"plugins": [
["react-native-edge-to-edge", {"android": {"parentTheme": "Material3"}}]
],
"resources": {
"android": [
"dist/res",
Expand Down
1 change: 1 addition & 0 deletions apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion apps/example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
TouchableOpacity,
Button,
Alert,
useColorScheme,
Platform,
} from 'react-native';
import { NavigationContainer, useNavigation } from '@react-navigation/native';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class ReactBottomNavigationView(context: Context) : BottomNavigationView(context
}
}
updateTextAppearance()
updateTintColors()
}
}
}
Expand Down Expand Up @@ -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
}
}
}

Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
Loading