首页 > 解决方案 > 如何在 xamarin android 中创建/设计自定义底部导航栏并将其连接到 xamarin.forms

问题描述

我想使用带有底部标签的标签页。我想在 android 中制作自定义底栏并在 TabbedPageRenderer 中使用它或对其进行充气。这可能吗?谁能帮我?

我想使用这样的东西。

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 
<FrameLayout android:id="@+id/bottomtab.navarea" android:layout_width="match_parent" 
android:layout_height="0dp" 
android:layout_gravity="fill" 
android:layout_weight="1" /> 
<android.support.design.widget.BottomNavigationView android:id="@+id/bottomtab.tabbar" android:theme="@style/Widget.Design.BottomNavigationView" android:layout_width="match_parent" 
android:layout_height="wrap_content"/> 
</LinearLayout>

然后在我的 TabbedPageRenderer 中,我只想将此布局用于底栏的设计。

就像您可以从 android 访问 Toolbar 和 Tabbar 一样。同样,我想访问或创建底部栏。

标签: xamarinxamarin.formsxamarin.android

解决方案


推荐阅读