Skip to content

TabBar in TabController.PageCarousel not rendering in Android but working in web #3263

Open
@candronikos

Description

Description

The code below renders correctly in the web and I am able to scroll between them and move to the page corresponding to the item in the TabBar when clicked. The same goes for the Android implementation when running from my phone but the TabBar is not visible.

Related to

  • Components
  • Demo
  • Docs
  • Typings

Steps to reproduce

Create an expo project and try running in both the web and android.

Expected behavior

I expected the TabBar to render on the bottom of the screen of my phone.

Actual behavior

TabBar is not visible at all but I am able to scroll between the tabs.

Code snippet

const Page = () => {
  return (
    <View style={{height:"100%", flex:1}}>
      <TabController
        items={[{ label: 'Page1' }, { label: 'Page2' }, { label: 'Page3' }, { label: 'Page4' }]}
        asCarousel={true}
      >
        <TabController.PageCarousel>
          <TabController.TabPage index={0}><Page1/></TabController.TabPage>
          <TabController.TabPage index={1}><Page2/></TabController.TabPage>
          <TabController.TabPage index={2}><Page3/></TabController.TabPage>
          <TabController.TabPage index={3}><Page4/></TabController.TabPage>
        </TabController.PageCarousel>
        <Text>Hi</Text>
        <TabController.TabBar enableShadows backgroundColor="black"/>
        <Text>Bye</Text>
      </TabController>
    </View>
  )
}

Environment

  • Windows 10
  • React Native version: 0.74.5
  • React Native UI Lib version: ^7.31.0

Affected platforms

  • Android
  • iOS
  • Web

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions