Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

ToolbarItem Icon not working on Android

$
0
0

Dear Collegues,

I am creating project in Xamarin.Forms as a part of my Master thesis project.
I have a XAML view:

<ContentPage.ToolbarItems>
        <ToolbarItem Text="Refresh">
            <ToolbarItem.Icon>
                <OnPlatform x:TypeArguments="FileImageSource"
                            iOS="ic_add_circle.png"
                            Android="ic_add_circle_black_24dp.png" />
            </ToolbarItem.Icon>


        </ToolbarItem>

        <ToolbarItem Text="Add" Order="Primary" />
    </ContentPage.ToolbarItems>

I have put resources in both Andorid nad iOS project:
Android:

iOS:

After running it on iOS it works great!

But on Android it is not :(
System.NullReferenceException: Object reference not set to an instance of an object

Any ideas what can I be doing wrong?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>