Last active
December 13, 2020 11:37
-
-
Save WendyYanto/f1f66d300e4161c7c1074fece9be64dd to your computer and use it in GitHub Desktop.
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
init { | |
val typeArray = context.theme.obtainStyledAttributes(attrs, R.styleable.LazyLoadComponent, 0, 0) | |
val parentResId = typeArray.getResourceId(R.styleable.LazyLoadComponent_parent_layout_id, -1) | |
val layoutRes = typeArray.getResourceId(R.styleable.LazyLoadComponent_layout_res, -1) | |
with(viewStub) { | |
layoutResource = layoutRes | |
addView(this) | |
} | |
typeArray.recycle() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment