I have the following code in Xamarin Forms:
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:XXX;assembly=XXX"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
BackgroundColor="{DynamicResource BarBackgroundColor}"
android:TabbedPage.ToolbarPlacement="Bottom"
android:TabbedPage.BarItemColor="Gray"
android:TabbedPage.BarSelectedItemColor="{DynamicResource BarSelectedItemColor}"
android:TabbedPage.IsSwipePagingEnabled="False"
x:Class="XXX.MainPage">
</TabbedPage>
I want to change the size of the Tabbar text in the Android
side. I have tried creating my own style like below:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="MyTabLayoutStyle" parent="TextAppearance.Design.Tab">
<item name="android:textSize">5sp</item>
</style>
</resources>
And in my Tabbar.axml
:
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.TabLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/tabs"
android:layout_width="match_parent"
app:tabGravity="fill"
app:tabMode="fixed"
app:tabTextAppearance="@style/MyTabLayoutStyle"/>
I have a feeling this is not working because I'm using TabbedPage.ToolbarPlacement="Bottom"
and instead of using TabLayout
, I am now utilizing the BottomNavigationView
. Hence, the question above, how can I change the tabbar's text size when using TabbedPage.ToolbarPlacement="Bottom"
.