Skip to content

Android: Tab labels flicker and disappear on initial render #223

@guillaumehcht

Description

@guillaumehcht

Before submitting a new issue

  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.

Bug summary

Description

On Android, the bottom tab labels briefly appear during initial render, then disappear, leaving only the icons visible. This behavior doesn't occur on iOS where everything works as expected.

Expected Behavior
Tab labels should remain visible alongside their icons on Android, just as they do on iOS.

Actual Behavior

  1. On initial render, tab labels appear briefly
  2. As soon as the icons load, the labels disappear
  3. Only icons remain visible in the tab bar
  4. This only happens on Android, iOS works correctly

Additional Information
Tried various solutions including:

  • Explicit tabBarLabel props
  • screenOptions with tabBarShowLabel: true
  • Pre-loading icons
  • Custom tab bar styling
  • None of these approaches resolved the issue

(Note that I've seen this issue since I started to use the package a couple months ago so I guess it's a running issue not something recently introduced. It works in a very very simple app, but whenever you have a more complex layout with Expo Router it seems to break but unsure about that if that's the reason.)

screen-20241221-190207.2.mp4

Screenshot_20241221-183910~2

Library version

0.7.8

Environment info

## Environment
- `@bottom-tabs/react-navigation`: 0.7.8
- React Native: 0.76.x (New Architecture)
- Expo SDK: 52
- Platform: Android

Steps to reproduce

Reproduction

  1. Create a basic Expo Router app with bottom tabs
  2. Implement bottom tabs using the following code:

Reproducible sample code

// BottomTabs.tsx
import { withLayoutContext } from 'expo-router';
import { createNativeBottomTabNavigator } from '@bottom-tabs/react-navigation';

export const Tabs = withLayoutContext(createNativeBottomTabNavigator().Navigator);

// _layout.tsx
import { Tabs } from "@/shared/components/Navigation/BottomTabs";
import { Platform } from "react-native";

const TabLayout = () => {
  return (
    <Tabs
      initialRouteName="explore"
      tabLabelStyle={{
        fontSize: 11,
        fontWeight: "500",
      }}
    >
      <Tabs.Screen
        name="explore"
        options={{
          title: "Explore",
          tabBarIcon: () =>
            Platform.select({
              ios: { sfSymbol: "figure.run" },
              android: require("@/shared/assets/icons/directions_run.svg"),
            }),
        }}
      />
      {/* Other tab screens... */}
    </Tabs>
  );
};

export default TabLayout;

Metadata

Metadata

Assignees

No one assigned

    Labels

    AndroidbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions