NavigationPage.SetTitleIcon - 适用于 iOS 但不适用于 Android

NavigationPage.SetTitleIcon - 适用于 iOS 但不适用于 Android

问题描述:

我添加了

NavigationPage.SetTitleIcon(this, "LogoLocales.png");

NavigationPage.SetTitleIcon(this, "LogoLocales.png");

看起来应该可以正常工作,但只能在 iOS 上运行,不能在 Android 上运行.

Looks like it should work fine, but only works on iOS not Android.

有什么想法吗?

在此处输入图片描述

添加

    <ImageView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/LogoLocales"
    android:layout_gravity="center" />

到toolbar.axml

to the toolbar.axml

然后你就...