Create an Overlay view to cover whole activity including toolbar in coordinator layout
问题 I want to create an overlay kind of layout to be displayed above an activity including toolbar. I cannot use any library to do this as everything that I've written is custom. I was able to achieve it by adding my view to decor view directly, by using this code : ViewGroup vg = (ViewGroup)(getWindow().getDecorView().getRootView()); tutorialViewContainer = (RelativeLayout) View.inflate(this, R.layout.layout_simple_overlay, null); vg.addView(tutorialViewContainer, params); but this code has an