Created
September 7, 2015 14:01
-
-
Save hjanuschka/72de7c09949981188def to your computer and use it in GitHub Desktop.
From http://stackoverflow.com/questions/14194967/android-addview-adding-a-new-view-on-top-of-activity
This file contains 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
Add View on top | |
FameLayout rootLayout = (FrameLayout)findViewById(android.R.id.content); | |
View.inflate(this, R.layout.overlay_layout, rootLayout); | |
Then when you want to remove it: | |
FrameLayout rootLayout = (FrameLayout)findViewById(android.R.id.content); rootLayout.removeViewAt(rootLayout.getChildCount()-1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment