标签栏图标高度使用反应原生导航库

时间:2018-06-12 07:41:39

标签: reactjs react-native react-native-navigation

我正在使用反应原生导航来启动基于标签的应用,这是代码

Navigation.startTabBasedApp({
        tabs: [
            {
                screen: "Starnote.CategoriesActivity",
                title: 'Categories',
                icon: require('../../assets/tabs/cat.png'),
                selectedIcon: require('../../assets/tabs/cat_act.png')
            },
            {
                screen: "Starnote.JobsActivity",
                title: 'Jobs',
                icon: require('../../assets/tabs/job.png'),
                selectedIcon: require('../../assets/tabs/job_act.png')
            },
            {
                screen: "Starnote.FavsActivity",
                title: 'Favourites',
                icon: require('../../assets/tabs/heart.png'),
                selectedIcon: require('../../assets/tabs/heart_act.png')
            },
            {
                screen: "Starnote.SeachActivity",
                title: 'Favourites',
                icon: require('../../assets/tabs/search.png'),
                selectedIcon: require('../../assets/tabs/search_act.png')
            },
            {
                screen: "Starnote.ProfActivity",
                title: 'Favourites',
                icon: require('../../assets/tabs/prof.png'),
                selectedIcon: require('../../assets/tabs/prof_act.png')
            }
        ],
        tabsStyle: {
            tabBarBackgroundColor: '#1f2533',
            tabBarSelectedButtonColor: '#f6a821',
        }
    })

标签包含图标但是高度比标签栏大,我该如何解决这个问题,这是通过此代码创建的标签栏图片, tabs at the bottom are coming out of tabbar

1 个答案:

答案 0 :(得分:1)

使用-

options: {
   bottomTab: {
      fontSize: 12
   }
}

添加fontSize选项