Over17 / UnityShowAndroidStatusBar

Show Android status bar for applications built with Unity 5.3 and later
MIT License
149 stars 35 forks source link

how to change color of the gray statusbar #15

Closed vahidreza closed 6 years ago

vahidreza commented 6 years ago

hey I tried below code and put it inside the @Override protected void onStart() method in the UnityPlayerActivity.java file with no success.

if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) { getWindow().setStatusBarColor(Color.parseColor("#FAFAFA")); }

Is there anyway so I can change the statusbar color even for sdk versions before lolipop?

Over17 commented 6 years ago

You can try AppCompat library: https://chris.banes.me/2014/10/17/appcompat-v21/