I’m not sure if there is a built-in solution that automatically applies to every activity.
But if you use Compose, you just need to add your Overlay in your root Composable, after you call your composables. And make sure the container is either a Box (if you want this to be a real overlay) or a Column (if you want this to act like a Header). This can be extended to other use cases like nested scrolling to hide the header and so on, but I think you get the idea
Like this :
// activity
OnCreate() {
setContent {
Box {
AppContent { … }
Overlay { … }
}
}
}