I have a custom LinearLayout that needs a referenc...
# android
n
I have a custom LinearLayout that needs a reference to mutable data. I know
MutableLiveData
is the standard, but
LinearLayout
doesn't have it's own lifecycle. Is this an acceptable solution?
Copy code
var data: List<Conditions?>? = null
		set(value) {
			field = value?
			postInvalidate() // cause redraw
		}
This field is changed from a RecyclerView on binding