Yury
11/30/2017, 10:23 AMvar isShowButton: Boolean
get() = button.visibilityExt
set(value) {
button.visibilityExt = value
}
visibilityExt is extension for View.
I’d like to use delegate for this. How I want to do it:
var isShowButton by ViewVisbilityDelegate(button)
But when property initialises button is null. So I found out a decision: I can send to delegate view’s id (for example R.id.button). But for this I have to call findViewById() for each item of ViewGroup.
May be someone had the same or similar problem and has good solution. Thanks