Hello all
I have some helpers
internal inline var View.isVisibleEx: Boolean
get() = isVisible
set(value) {
if (value != isVisible) isVisible = value
}
internal fun AppCompatTextView.setFastText(text: String?) =
this.setTextFuture(
PrecomputedTextCompat.getTextFuture(
text.orEmpty(),
this.textMetricsParamsCompat,
Dispatchers.Default.asExecutor()
)
)
How to globalf (write Magic fun/extention/proxy) for any Object params (Object extends View):
- CHeck value for changed before chnge (reduce ibservers calls)
2/ Alltime sets switch to Main context when setiing value
3/ autouse setFastText for all set text calls like binding.view.text = “aaa”
I want some lijke Asspect but i beelive what kotlin can do this without external parts