Skip to content

Commit 55af7f6

Browse files
committed
fix: update tint colors after updating items
1 parent 4095802 commit 55af7f6

File tree

2 files changed

+11
-7
lines changed
  • apps/example/src
  • packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview

2 files changed

+11
-7
lines changed

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

0 commit comments

Comments
 (0)