There is no such SDK support for this, but you can do it with a bit of workaround coding.
You can use WindowManager to insert an opaque floating right view at the top of the screen that matches the rest of your layout and looks like part of it.
Make sure your input view is set to ignore touch events and pass them to anything below it. This should allow users to drag the notification bar, without actually keeping it visible on the screen. Well, it is still visible, just closed by your floating view.
Keep in mind that this requires that your activity topic is not populated.
source share