arekolek
02/14/2019, 11:43 AMuse
from KTX, but still have it if you actually don’t recycle the TypedArray
? (Not this instance of course, but any future instances)gildor
02/14/2019, 1:23 PMarekolek
02/14/2019, 1:43 PM(Not this instance of course, but any future instances)
arekolek
02/14/2019, 1:43 PMarekolek
02/14/2019, 1:43 PMleosan
02/14/2019, 1:45 PMwithStyledAttributes
?arekolek
02/14/2019, 1:47 PMarekolek
02/14/2019, 3:49 PMuse
you can return a value, which can be useful sometimes
private val foo: Boolean
init {
foo = context.obtainStyledAttributes()
.use {
// do some stuff with it
it.getBoolean()
}
}
arekolek
02/24/2019, 11:04 AM