Xamarin - Android - ActionBar background color issue

  • Thread starter Thread starter wil70
  • Start date Start date
W

wil70

Guest
Hello,


I'm able to have the ActionBar (the one on the bottom of the screen with the switch, home and back buttons) to be hidden with a Transparent (or black, not totally sure) background by doing the following:

In style.xml I have
<item name="windowActionModeOverlay">true</item>

In MainActivity.cs I have added the following

newUiOptions |= (int)SystemUiFlags.LowProfile;
newUiOptions |= (int)SystemUiFlags.Fullscreen;
newUiOptions |= (int)SystemUiFlags.HideNavigation;
newUiOptions |= (int)SystemUiFlags.Immersive;
newUiOptions |= (int)SystemUiFlags.ImmersiveSticky;
Window.DecorView.SystemUiVisibility = (StatusBarVisibility)newUiOptions;

I do not want the Navigation to be hidden. If I remove few SystemUiFlag so the ActionBar is not hidden anymore then the background stays as default meaning with a bright grey background but I would like it to be with a black background and with grey icons (home, switch, back), any idea?

1. How do I make the ActionBar (the one with the back, home buttons on the bottom) with a black background and White (or grey) icons?

2. I use a Picker component, but when I select an ItemSource via the UI then the ActionBar is reset and is back to its default (with a Grey background and black icons), I would like it to stay the opposite with a black background and a white/grey icons. Any idea?

Thank you for your help



w.

Continue reading...
 
Back
Top