4

I have created a TabbedPage with four ContentPages as the TabbedPage.Children with Title. The Titles presented in iOS app is perfect and able to read. However, in Android it seems the Title font size is too large to be displayed even I change the Preference Font Size in the Android device's setting.

Here is my TabbedPage XAML file

<?xml version="1.0" encoding="UTF-8"?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" 
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
            xmlns:local="clr-namespace:MyApplication.Views;assembly=MyApplication"
            x:Class="Demo.TabbedPageView"
            Title="My Application">
    <TabbedPage.Children>
        <local:View One/>
        <local:View Two/>
        <local:View Three/>
        <local:View Four/>
    </TabbedPage.Children>
</TabbedPage>

TabbedPage Screenshot

iOS - https://ibb.co/fmCZcH

Android - https://ibb.co/drEQjx

My questions are

  1. How can I change the Title's font size in ResourceDictionary?
  2. Is there any other way to achieve the same goal in this case?
JackyLoo
  • 309
  • 5
  • 13

1 Answers1

2

You could use custom style and change the text size of the tabs.
See this How to use custom style for tab

And change the style:

<style name="CustomTab" parent="@android:style/Widget.Holo.ActionBar.TabText">
    <item name="android:textSize">5sp</item>
</style> 
Morse
  • 8,258
  • 7
  • 39
  • 64
MShah
  • 1,247
  • 9
  • 14
  • I realise it can only be done by editing from the native project code but not in Xamarin.Form project itself. Anyway, thanks for your answer. – JackyLoo May 06 '18 at 10:03