Xamarin.Forms 3.1.0+版本 Android 原生支持底部导航栏

Xamarin.Forms 3.1.0+版本 Android 原生支持底部导航栏

Xamarin.Forms 3.1.0以上版本终于支持Android底部导航栏啦,可以不用第三方的支持库了。

https://developer.xamarin.com/releases/xamarin-forms/xamarin-forms-3.1/3.1.0/

C#代码:

On<Android>().SetToolbarPlacement(ToolbarPlacement.Bottom);

Xaml代码:

<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" 
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
            xmlns:views="clr-namespace:TheLittleThingsPlayground.Views" 
            x:Class="TheLittleThingsPlayground.Views.MainPage"
            BarBackgroundColor="#F1F1F1"
            xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
            android:TabbedPage.ToolbarPlacement="Bottom"
            android:TabbedPage.BarItemColor="#666666"
            android:TabbedPage.BarSelectedItemColor="Black">
原文地址:https://www.cnblogs.com/devin_zhou/p/9386441.html