Agha Ali Abbas
Agha Ali Abbas

Reputation: 195

Tab bar icon height using react native navigation library

I am using react native navigation to start a tab based app, here is the code

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',
        }
    })

The tabs contain the icons but there height is greater then the tab bar, how can i fix this, here is the picture of tab bar created through this code, tabs at the bottom are coming out of tabbar

Upvotes: 1

Views: 283

Answers (1)

shekhar chugh
shekhar chugh

Reputation: 26

Use -

options: {
   bottomTab: {
      fontSize: 12
   }
}

add fontSize option

Upvotes: 1

Related Questions