Forum Xamarin Xamarin.Android

Hide App Icon from ActionBar

Is there a way to hide the App Icon in the ActionBar?



  • CheesebaronCheesebaron DKInsider, University mod

    Just set the Icon Drawable for the ActionBar to Android.Resource.Color.Transparent

  • iamIcarusiamIcarus CYMember ✭✭

    works great thank you :)

  • VincentPoirierVincentPoirier CAMember ✭✭

    Where do you apply this?
    I tried this but I'm most definitely wrong:

    [Activity (Label = "MagiKlaim", Icon = Android.Resource.Color.Transparent, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation, Theme = "@android:style/Theme.Holo.Light")]

  • VincentPoirierVincentPoirier CAMember ✭✭

    I hid it by making my icon a 1x1 transparent image. Quite the unclean coding there. :blush:

  • SebastianSeidel.9226SebastianSeidel.9226 DEInsider, University ✭✭✭✭

    Simple add ActionBar.SetIcon(Android.Resource.Color.Transparent); inside OnCreate.

  • VincentPoirierVincentPoirier CAMember ✭✭

    Thank you, it works! It wasn't explicit enough for a total beginner before.

  • HideyaHideya TNMember

    Haha @VincentPoirier I did the same, i guess its a pretty clever trick :blush:

Sign In or Register to comment.