This code has no errors 🙂
Click OnCreate and search for Add source and paste the code:
_toolbar.setBackgroundColor(Color.TRANSPARENT);
Window window = this.getWindow();
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); window.addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.setStatusBarColor(Color.TRANSPARENT); }
((ViewGroup)_toolbar.getParent()).removeView(_toolbar);
toolbar.addView(_toolbar);
int statusBar = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (statusBar > 0) {
status_bar.getLayoutParams().height = getResources().getDimensionPixelSize(statusBar);
©2025 Sketchub | User Policy