Skip to content

Instantly share code, notes, and snippets.

@SemonCat
Last active November 13, 2015 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SemonCat/b5b943016781b49cf4a9 to your computer and use it in GitHub Desktop.
Save SemonCat/b5b943016781b49cf4a9 to your computer and use it in GitHub Desktop.
public static void setupWindowTranslucentStatus(Activity activity) {
if (activity.getResources().getIdentifier("windowTranslucentStatus", "attr", "android") != 0) {
Window w = activity.getWindow(); // in Activity's onCreate() for
// instance
w.setFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS,
WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment