0

how can place createMaterialTopTabNavigator inside a CardView?

I want to achieve the design shown in the below screenshot

enter image description here

I am not understanding where should i write the createMaterialTopTabNavigator, should i write it in the same page or should i write it in the RootScreen (Where multiple navigators are present eg: StackNavigator and BottomTabNavigator)

how should i go about creating this?

4

1 回答 1

0

I created a createMaterialTopTabNavigator in the same page where i wanted to add a tab component


const HistoryTabs = (
  {
    UPoints: {
      screen: UPointsScreen,     
    },
    MyPurchases: {
      screen: MyPurchasesScreen,     
    },

  },
  {initialRouteName:'UPoints' }

);
const AppContainer = createAppContainer(HistoryTabs);

and in render i called

 <View style={{flex:1}}>
      <AppContainer/>
 </View>
于 2019-11-04T13:01:48.313 回答