I\'d like to integrate something like this:
And I\'ve done it like this, but I can\'t seem to put the imageview below the toolbar. Without the toolbar, I ca
Got that fixed, but toolbar is overlapping the status bar. Is there anyway to fix the padding? If I use android:fitsSystemWindows="true", status bar isn't translucent anymore.
I've recently written a post about WindowInsets, you may check it out. I think it would resolve your issue.
Long story short - what you have to do is to pass window insets only to Toolbar
via ViewCompat.setOnApplyWindowInsetListener
API. But the parent of your Toolbar
should pass the window insets. In your case that won't happen, because by default LinearLayout
and family layouts won't do that, you have to subclass and override onApplyWindowInsets
method.
I suggest you to read the article, where everything is described more precisely.