Hi!
I use latest NativeScriptAngular version
I can't increase and decrease tabItem 'Scanner' and 'Term茅keim' font Size
The color change is ok but I can't find how can I css change size?
Can U help me?
TabView {
selected-tab-text-color: $theme-primary-color;
border-bottom-color: $theme-primary-color;
android-selected-tab-highlight-color: $theme-primary-color;
}
<TabView #tabview
(selectedIndexChanged)="tabIndexChanged($event)">
<StackLayout *tabItem="{title: 'Scanner'}">
...
</StackLayout>
<StackLayout *tabItem="{title: 'Term茅keim'}">
...
</StackLayout>
</TabView>
Hi @bumbella,
I reviewed your scenario, however, at the moment there is no functionality, which allows changing the tab's title fontSize. Regarding that, I will mark this as a feature request.
TabView {
selected-tab-text-color: $theme-primary-color;
border-bottom-color: $theme-primary-color;
android-selected-tab-highlight-color: $theme-primary-color;
font-size:30;
}
As a temporary solution, you could set a fontSize for the whole TabView , which will affect the tabs titles and the child component inside the TabView in Android. Keep in mind that this solution will not work for iOS.
There is a way to do this for some time now. See https://github.com/NativeScript/NativeScript/pull/5752.
Basically the TabView has a new property tabTextFontSize and corresponding CSS rule tab-text-font-size which affects only the tab title text.
<Page>
<TabView tabTextFontSize="8">
<TabView.items>
<TabViewItem title="First">
<TabViewItem.view>
<GridLayout>
<Label text="First View" verticalAlignment="center" horizontalAlignment="center"/>
</GridLayout>
</TabViewItem.view>
</TabViewItem>
<TabViewItem title="Second">
<TabViewItem.view>
<GridLayout>
<Label text="Second View" verticalAlignment="center" horizontalAlignment="center"/>
</GridLayout>
</TabViewItem.view>
</TabViewItem>
</TabView.items>
</TabView>
</Page>
tabTextFontSize="8" doesn't work
try this in css file
TabView {
tab-text-font-size: 15
}
Most helpful comment
tabTextFontSize="8" doesn't work