Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show status bar when sweet alert dialog show #27

Closed
skywalkerlw opened this issue Jan 6, 2015 · 3 comments
Closed

show status bar when sweet alert dialog show #27

skywalkerlw opened this issue Jan 6, 2015 · 3 comments

Comments

@skywalkerlw
Copy link

In my app, there's no status bar (see my way below to hide status bar). However, every time I show alert dialog, the status bar is coming annoying again.

View decorView = getWindow().getDecorView();
int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.hide();
}

@pedant
Copy link
Owner

pedant commented Jan 6, 2015

decorView.setSystemUiVisibility just set the content view of activity full-screen, it will not effect the dialog view state unless you call setSystemUiVisibility for dialog view alone. As a suggestion, you should set activity full-screen as following:

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);

@skywalkerlw
Copy link
Author

I verified your code and it passed.

Lovely answer, thanks so much.

@pedant
Copy link
Owner

pedant commented Jan 6, 2015

you're welcome.

@pedant pedant closed this as completed Jan 6, 2015
rezaulkhan111 pushed a commit to rezaulkhan111/sweet-alert-dialog that referenced this issue Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants