Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void removeActionbar()
- {
- try
- {
- ((AppCompatActivity)activity).getSupportActionBar().hide();
- } catch (Exception ex)
- {
- try {
- activity.getActionBar().hide();
- } catch (Exception exx)
- {
- Log.e("Action Bar", exx.getMessage());
- }
- }
- }
- public void transparentStatusBar()
- {
- try {
- Window window = activity.getWindow();
- window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
- window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
- window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
- window.setStatusBarColor(Color.TRANSPARENT);
- } catch (Exception ex)
- {
- Log.e("Transparent Status Bar", ex.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement