Unwanted icon on navigation bar, Forms 4

GerryHGerryH USMember ✭✭✭
edited June 11 in Xamarin.Forms

I tried upgrading to Xamarin Forms 4, but immediately went back to 3. I am using simple navigation with NavigationPage, using:
NavigationPage.TitleIcon="transparent.png" in the ContentPage header element. As you can probably guess, transparent.png is a transparent image.

But after upgrading to 4, I am getting a default Xamarin icon on the navbar. I do not want an icon there, but I can't figure out how to get rid of it in Forms 4.

Best Answers

  • GerryHGerryH US ✭✭✭
    Accepted Answer

    I found on Android adding transparent icon to MainActivity seems to work, haven't tried iOS yet

    [Activity(Label = "MyActivity", MainLauncher = false, Icon = "@drawable/transparent", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]

  • GerryHGerryH US ✭✭✭
    Accepted Answer

    Haven't seen the problem on iOS

Answers

  • JarvanJarvan Member, Xamarin Team Xamurai

    But after upgrading to 4, I am getting a default Xamarin icon on the navbar.

    What's the default Xamarin icon? Could you post a image to display it?
    I created a basic MasterDetail sample and update Forms to 4.0. It works well without default icon in ContentPage. See as shown.

    You can try to create a MasterDetail project derectly . Then update Xamarin Forms.

  • GerryHGerryH USMember ✭✭✭
    Accepted Answer

    I found on Android adding transparent icon to MainActivity seems to work, haven't tried iOS yet

    [Activity(Label = "MyActivity", MainLauncher = false, Icon = "@drawable/transparent", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]

  • GerryHGerryH USMember ✭✭✭
    Accepted Answer

    Haven't seen the problem on iOS

Sign In or Register to comment.