Skip to content

Instantly share code, notes, and snippets.

@thebuilder
Last active June 27, 2016 15:19
Show Gist options
  • Save thebuilder/5081990 to your computer and use it in GitHub Desktop.
Save thebuilder/5081990 to your computer and use it in GitHub Desktop.
Get the root FrameLayout of an Android activity.
public FrameLayout getRootFramelayout() {
if (_root == null) _root = (FrameLayout) getActivity().getWindow().getDecorView().findViewById(android.R.id.content);
return (FrameLayout) _root.getChildAt(0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment