Search code examples
androidnotification-bar

I don't want to show SystemUI when I show a alert dialog on the parent fullscreen activity


I have a full screen activity, but when I show a alert dialog above it, System UI showed (System Notification Bar). Can anybody help me ? I don't want it to be visible. Is there is any way I can hide the system notification bar from showing when the alert dialog appears?

enter image description here

enter image description here


Solution

  • Which Context-object are you using when instantiating your Dialog?

    Maybe try using your activity? You can do this by passing "this" as context.

    I know some people are calling getApplicationContext() which is not (always) the right way.