【发布时间】:2021-03-02 22:29:05
【问题描述】:
我在 NavigationBar.xaml 中将这段代码用于我的 tabbedPage
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:xyz"
x:Class="xyz.NavigationBar"
android:TabbedPage.ToolbarPlacement="Bottom"
BarBackgroundColor="#000000"
android:TabbedPage.BarItemColor="#FFFFFF"
android:TabbedPage.BarSelectedItemColor="Red"
>
</TabbedPage>
工具栏放置在底部。
感谢 James Montemagno 的一篇文章,我已经能够更改文本大小:
https://montemagno.com/control-text-size-on-android-bottom-navigation/
他在其中指出,可以通过在 Resources/values 中添加一个 dimen.xml 文件来更改文本大小,并使用以下代码:
<resources xmlns:tools="http://schemas.android.com/tools">
<dimen name="design_bottom_navigation_text_size" tools:override="true">12sp</dimen>
<dimen name="design_bottom_navigation_active_text_size" tools:override="true">12sp</dimen>
</resources>
这很好。 但是,是否可以使用相同的方法更改字体系列?我也在使用自定义字体。
提前致谢
【问题讨论】:
-
有人知道怎么做吗?
标签: xml xaml xamarin xamarin.forms xamarin.android