https://kotlinlang.org logo
#android
Title
# android
d

dpk

11/29/2018, 4:29 PM
using kotlin android extensions with two different layout xmls for the same custom class, where the two layouts use the same ids for views that are different but share a common base class (something like
Button
and
TextView
), is there a built-in way to tell KAE to cast views to a specific base class when reading from its cache? for now i’m stepping out of KAE and just using
findViewById<Base>(R.id.whatever).property = blah
. i saw some discussion of customizing the cache but haven’t figured out where the code for that is.
n

Nirmal

11/29/2018, 4:48 PM
Is there a way for that? Just curious. What you said is what i use for my work around.
l

louiscad

11/29/2018, 6:19 PM
There's no way to do that right now
d

dpk

11/29/2018, 6:28 PM
ok, cool. i figured it was pretty esoteric. thanks for the confirmation!
3 Views