Inflate when clicked

Report a typo

Make ViewStub inflate a sub-hierarchy when the button is clicked.

val expandBtn = findViewById<Button>(R.id.expand)
val expandable = findViewById<ViewStub>(R.id.expandable)
expandBtn.setOnClickListener {
    expandBtn.isEnabled = false
    ____________________
}
Enter a short text
___

Create a free account to access the full topic