Android: How to set status bar and navigation bar semi transparent

Lord Goderick picture Lord Goderick · Jan 13, 2017 · Viewed 10.5k times · Source

In some applications I noticed that the status bar and navigational bar are transparent however, not completely. I do not know if this is a background color or something else. Would someone tell me how to implement this? Thank you.

enter image description here

Answer

ak sacha picture ak sacha · Jan 13, 2017

You can use this two method:

getWindow().setStatusBarColor(Color.parseColor("#20111111"));
getWindow().setNavigationBarColor(Color.parseColor("#20111111"));