pocheshire / BottomNavigationBar

Bottom Navigation Bar for Xamarin
214 stars 70 forks source link

Change background color of Bottom Bar #5

Closed glalwani2 closed 8 years ago

glalwani2 commented 8 years ago

Hi, I need my bottom bar to have jet black background with icons given as png images( that are in white ) and when it anyone is selected( the image should change ). I am not sure if we can do that in this library. But what i Was trying I used the UseDarkTheme() and the bottom bar had dark grey background and the color of my icons changed to grey from transparent(as they are png). How i Can make my bottom bar background color black and at the same time keep my pngs as it is or change them to white.

pocheshire commented 8 years ago

_bottomBar.UseDarkTheme(); and _bottomBar.SetActiveTabColor(global::Android.Graphics.Color.White);

glalwani2 commented 8 years ago

No But I want my Inactive icons color as White and Active Icons color as red.and the background of bottombar as black. Currently using UseDarkTheme() makes the background color of bottombar as dark grey and default icon color as light grey.

pocheshire commented 8 years ago

Then you should use _bottomBar.UseDarkTheme(); and _bottomBar.SetActiveTabColor(global::Android.Graphics.Color.Red); (or any color in SetActiveTabColor(...)). You can't customize icons in inactive state

glalwani2 commented 8 years ago

But thats the problem, the _bottomBar.UseDarkTheme(); makes the bottom bar background dark grey and the icons color as light grey i need them black background with white icons.If you get my point. Please help.

pocheshire commented 8 years ago

I found a solution. For change bottom bar background in dark theme mode add in color.xml: <color name="bb_darkBackgroundColor">#000000</color> then use method _bottomBar.UseDarkThemeWithAlpha(false); I added in 1.0.10 version

glalwani2 commented 8 years ago

Thank you so much Pocheshire for this enhancement. I am very grateful to you for this.