How do I remove the icon and add title text to the navigationbar?

QuakeulfQuakeulf NOMember ✭✭✭

Hi, I am struggling to get the NavigationBar to work as intended on Android in connection with a MasterDetailPage. It works fine on iOS (this is a portable forms project), but for some reason it shows just the app's icon centered and nothing else on Android. I can set the background colour on Android, but nothing else works on that platform.

Please help me. I have looked at a lot of different solutions to this but nothing has worked so far. It should really be as simple as NavigationPage.SetHasIcon(this, false) (though this is not in the code) or just Icon = null.

Best Answer

  • QuakeulfQuakeulf NO ✭✭✭
    Accepted Answer

    I found a "hacky" way to fix this:

    ActionBar.SetIcon(null); in the MainActivity.cs-file.

Answers

  • AlessandroCaliaroAlessandroCaliaro ITMember ✭✭✭✭✭

    If I remember, I have used a 1x1 transparent icon...

  • QuakeulfQuakeulf NOMember ✭✭✭

    @AlessandroCaliaro said:
    If I remember, I have used a 1x1 transparent icon...

    I tried setting the icon to other icons but it refuses to set it.

  • QuakeulfQuakeulf NOMember ✭✭✭
    Accepted Answer

    I found a "hacky" way to fix this:

    ActionBar.SetIcon(null); in the MainActivity.cs-file.

Sign In or Register to comment.