File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/react-native-bottom-tabs/android/src/main/java/com/rcttabview Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' react-native-bottom-tabs ' : patch
3+ ---
4+
5+ fix: show small badge on Android when passing empty space
Original file line number Diff line number Diff line change @@ -248,7 +248,11 @@ class ReactBottomNavigationView(context: Context) : LinearLayout(context) {
248248 if (item.badge?.isNotEmpty() == true ) {
249249 val badge = bottomNavigation.getOrCreateBadge(index)
250250 badge.isVisible = true
251- badge.text = item.badge
251+ // Set the badge text only if it's different than an empty space to show a small badge.
252+ // More context: https://github.com/callstackincubator/react-native-bottom-tabs/issues/422
253+ if (item.badge != " " ) {
254+ badge.text = item.badge
255+ }
252256 } else {
253257 bottomNavigation.removeBadge(index)
254258 }
You can’t perform that action at this time.
0 commit comments