How to implement this with AppBarom? I understand how you can’t do without Toolbar?
1 answer
if ActionBar: set up transparent ActionBar
getActionBar().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); make an image for the background, the background of your Window
getWindow().setBackgroundDrawable(Drawable); //или setBackgroundDrawableResource(id); if toolbar:
getSupportActionBAr().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); getWindow().setBackgroundDrawable(Drawable); //или setBackgroundDrawableResource(id); Add the layout of your layout with the Toolbar to the xml, before the Toolbar View with a height of 25 and width match_parent
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); |
