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

aris

05/19/2017, 7:04 AM
kotlin extensions
m

myanmarking

05/19/2017, 11:00 AM
aris: hello
android extensions works great, so there’s no need to use butterknife
the only case i see is in custom viewgroups, in which the plugin doesnt work. in that case, you can do it by hand(findViewById), or use Butterknife
a

aris

05/19/2017, 11:01 AM
it’s a bug?
m

myanmarking

05/19/2017, 11:01 AM
no, dont think it is
well
you can use it, but it will only generate a findViewbyId in every place you use it
so not very efficient
my advice, use in in activity, fragment and dialogs. use findViewById in custom viewgroupd
and when u need to call a view multiple times in row, for example recyclerview
to initiate adapter, layoutmanager, decorators etc. do it like this: rv.run{} and do the stuff inside it
the plugin is good but it generates a cast everytime you access a view. thats the only thing i dislike. appart form that, amazing
a

aris

05/19/2017, 11:24 AM
Okey, perfect. Thx!