Over17/UnityShowAndroidStatusBar

Changing color navigation bar

SamihElsakhawi opened this issue · 3 comments

Hey,

I would like to know if is it possible to change the color of the navigation bar?

Hi!

It is.

  1. Use the non-transparent theme, Transparent navigation bar does not allow for the color change: https://developer.android.com/reference/android/view/Window.html#setNavigationBarColor(int)
  2. in res/values-v21/styles.xml, modify the non-transparent theme as follows:
    <style name="UnityStatusBarTheme" parent="android:Theme.Material.Light.NoActionBar.Fullscreen"> <item name="android:navigationBarColor">your_color_here</item> </style>
  3. Enjoy

Additional info: http://stackoverflow.com/questions/27839105/android-lollipop-change-navigation-bar-color

Thanks a lot! :)

But where i put my color, it's a color int or i can put my own RGB value?

Color can be RGB or a pre-defined name.
You should probably read up on Android docs: https://developer.android.com/guide/topics/ui/themes.html