所以一个菜鸟问题:我在 Xamarin 中启动了一个带有导航栏的项目,我只想根据我的应用程序更改默认图标并更改它们下的名称。我可以在构造函数视图中这样做吗?按钮本身已经做了我想让它们做的事情,但我只想改变它们的外观。 pic activity_main.xml 以防万一:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/containerTwo"
android:layout_width="match_parent"
android:layout_height="match_parent">
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/navigation" />
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="0dp"
android:layout_marginStart="0dp"
android:background="?android:attr/windowBackground"
android:layout_alignParentBottom="true"
app:menu="@menu/navigation"
android:accessibilityHeading="true"
/>
</RelativeLayout>
</RelativeLayout>
答案 0 :(得分:0)
好的,我知道了。我设法做到的:
注意:有时预览会乱七八糟,例如它可能会以不同的比例调整图标的大小,但是当您模拟构建或在真实手机上执行时,一切看起来都很好。