Search code examples
androideclipseviewstatusbar

Display view above status bar?


I recently saw an image of an app that was capable of displaying a view above the status bar and was also able to cover it with a view.

I know you can get a view right below the status bar from a view with align parent top. But how would you get a view on top of the status bar??

Example


Solution

  • The answer by @Sadeshkumar is incorrect for ICS and above (perhaps GB as well).

    A view created with TYPE_SYSTEM_ALERT and FLAG_LAYOUT_IN_SCREEN is covered by the StatusBar.

    To get an overlay on top of the StatusBar, you need to use TYPE_SYSTEM_OVERLAY instead of TYPE_SYSTEM_ALERT.

    The problem being then, how to get clicks/touches?