sketchub icon

Tansparent status bar and navigation bar

CoCoCo_CoCoCo
70 Likes
5 Comments
890 Downloads

Screenshots

About

I would like to have the statusbar and the navigationbar Translucent on my Main activity, while all the other activities use the Material Design.

code:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { Window window = this.getWindow(); Drawable background = this.getResources().getDrawable(R.drawable.background); 

window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); 

window.setStatusBarColor(getResources().getColor(android.R.color.transparent)); 

window.setNavigationBarColor(getResources().getColor(android.R.color.transparent)); window.setBackgroundDrawable(background);
}

©2025 Sketchub | User Policy