Created
December 24, 2019 16:21
-
-
Save raxhaxor/3dbcdd3b71919a905f1b8f099e30ede8 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
@Override | |
public void setContentView(int layoutResID) { | |
if (mContentParent == null) { | |
installDecor(); | |
} else { | |
mContentParent.removeAllViews(); | |
} | |
mLayoutInflater.inflate(layoutResID, mContentParent); | |
final Callback cb = getCallback(); | |
if (cb != null && !isDestroyed()) { | |
cb.onContentChanged(); | |
} | |
} | |
@Override | |
public void setContentView(View view) { | |
setContentView(view, new ViewGroup.LayoutParams(MATCH_PARENT, MATCH_PARENT)); | |
} | |
@Override | |
public void setContentView(View view, ViewGroup.LayoutParams params) { | |
if (mContentParent == null) { | |
installDecor(); | |
} else { | |
mContentParent.removeAllViews(); | |
} | |
mContentParent.addView(view, params); | |
final Callback cb = getCallback(); | |
if (cb != null && !isDestroyed()) { | |
cb.onContentChanged(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment