在xamarin.forms中为android自定义选项卡式页面

时间:2018-12-12 04:18:23

标签: xamarin.forms renderer

我想为底部标签创建这种设计(更改Xamarin表单中标签页的选定标签的背景颜色)

enter image description here

我想在android上解决此问题。请帮我!谢谢。

1 个答案:

答案 0 :(得分:0)

需要对此问题进行进一步的说明,如果要将标签栏移到底部(如在iOS中一样),下面的代码会帮助您。

<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
        x:Class="XXX.Views.TabbedPage" 
        xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core"
        android:TabbedPage.ToolbarPlacement="Bottom"
        android:TabbedPage.BarItemColor="#a39d9f"
        android:TabbedPage.BarSelectedItemColor="#007aff"
        android:TabbedPage.IsSwipePagingEnabled="false"
        BackgroundColor="#f8f8f8"
        Padding="5,0,5,0" >

</TabbedPage>