Xamarin Form - 如何更改 ResourceDictionary 中的 TabbedPage 标题字体大小

Xamarin Form - How to change TabbedPage title font size in ResourceDictionary

我创建了一个 TabbedPage 和四个 ContentPages 作为 TabbedPage.ChildrenTitle。 iOS 应用程序中显示的 Titles 是完美的并且能够阅读。但是,在 Android 中,即使我在 Android 设备设置中更改首选项字体大小,似乎 Title 字体大小也无法显示。

这是我的 TabbedPage XAML 文件

<?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 截图

iOS - https://ibb.co/fmCZcH

Android - https://ibb.co/drEQjx

我的问题是

  1. 如何在 ResourceDictionary 中更改 Title 的字体大小?
  2. 在这种情况下,还有其他方法可以实现相同的目标吗?

您可以使用自定义样式并更改选项卡的文本大小。
看到这个

并更改样式:

<style name="CustomTab" parent="@android:style/Widget.Holo.ActionBar.TabText">
    <item name="android:textSize">5sp</item>
</style>