tab’s fontSize not working
Using the latest NativeBase version (2.11), trying to change my tabs font, but it does not change:
<SafeAreaView style = {{ flex: 1, backgroundColor: 'transparent' }}>
<Container style = {{ backgroundColor: 'transparent' }}>
<Tabs
style = {{ backgroundColor: 'transparent' }}
tabBarUnderlineStyle = {{ backgroundColor: BOB_RED, height: 3 }}
renderTabBar = {() =>
<ScrollableTab
backgroundColor = 'transparent'
style = {{ backgroundColor: 'transparent' }}
/>
}
>
<Tab
textStyle = { styles.tabTextStyle as TextStyle }
activeTextStyle = { styles.activeTabTextStyle as TextStyle }
tabStyle = { styles.tabStyle as ViewStyle }
activeTabStyle = { styles.activeTabStyle as ViewStyle } heading = { currentSheetTabTitle}>
<SingleTimesheetScreen
sheetId = { Consts.THIS_MONTH_SHEET_ID }
navigator = { this.props.navigator }
/>
</Tab>
<Tab
textStyle = { styles.tabTextStyle as TextStyle }
activeTextStyle = { styles.activeTabTextStyle as TextStyle }
tabStyle = { styles.tabStyle as ViewStyle }
activeTabStyle = { styles.activeTabStyle as ViewStyle } heading = { strings.previousSheetsTabTitle }>
<TimesheetsListScreen
navigator = { this.props.navigator }
/>
</Tab>
</Tabs>
</Container>
</SafeAreaView>
const styles = StyleSheet.create({
tabTextStyle: {
fontFamily: GOTHAM_BOOK, fontSize: 12, color: BOB_DARK_TEXT
},
activeTabTextStyle: {
fontFamily: GOTHAM_MEDIUM, fontSize: 12, color: BOB_DARK_TEXT
},
tabStyle: {
backgroundColor: 'transparent', top: 3
},
activeTabStyle: {
backgroundColor: 'transparent'
}
})
Works fine

ok, it was because of the renderTabBar implementation, with the ScrollableTab. Do I need it for the ability to scroll-swipe between the tabs?
Did you find a solution @oferRounds? I have the same problem with you. -_-
I removed the renderTabBar override...
No. Cause I need the scrollable tab. What I'm gonna do?
@SupriyaKalghatgi
I m facing the same issue, in my scenario i want to use renderTabBar , How can i change my font size??
@BharathBunty @phanbien9x This is the only workaround that I've found to use ScrollableTab with fontSize change. You lose the activeTabStyle and activeTextStyle though. (someone may have an additional workaround for this loss)
<Tabs
renderTabBar = {() =>
<ScrollableTab />
}>
<Tab
heading={
<TabHeading style={styles.tabStyle as ViewStyle}>
<Text style={styles.tabTextStyle as TextStyle}>
{ currentSheetTabTitle}
</Text>
</TabHeading>
}>
<SingleTimesheetScreen />
</Tab>
</Tabs>
Facing same issue on native-base v2.12.1 @lantractech workaround works, thank you!
@lantractech is working. But it is not working well for activeTextstyle.
import {StyleProvider,Tabs,Tab} from 'native-base';
<StyleProvider style={{variables:{tabFontSize:12}}}>
<Tabs></Tabs>
</StyleProvider>