Created
December 24, 2019 16:10
-
-
Save raxhaxor/33537f455aed208a4b6815b25777b618 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected ViewGroup generateLayout(DecorView decor) { | |
... | |
if (..) {} | |
else if (..) {} | |
else if ((features & (1 << FEATURE_ACTION_MODE_OVERLAY)) != 0) { | |
layoutResource = com.android.internal.R.layout.screen_simple_overlay_action_mode; | |
} | |
else { | |
// Embedded, so no decoration is needed. | |
layoutResource = com.android.internal.R.layout.screen_simple; | |
// System.out.println("Simple!"); | |
} | |
... | |
View in = mLayoutInflater.inflate(layoutResource, null); | |
decor.addView(in, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)); | |
ViewGroup contentParent = (ViewGroup)findViewById(ID_ANDROID_CONTENT); | |
if (contentParent == null) { | |
throw new RuntimeException("Window couldn't find content container view"); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment