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

krenvpravo

11/26/2017, 10:28 PM
Android extentions useful only if you have short, while still unique ids. It is not the case for big apps with many complex UI elements.
r

rkeazor

11/27/2017, 1:17 AM
I think its the same thing, regardless of the size of the app, you just have to remember to give your UI components in XML useful names. I think the issue might stimulate when you try used in a recyclerview, because i don’t know if they are cached or not when not they are not part of a activity or fragment
p

Paul Woitaschek

11/27/2017, 7:38 AM
Yeah it's a pain to use with include tags
r

rkeazor

11/27/2017, 10:52 AM
I really dont understand how that can be a pain ,over creating variables for each of the and having to do findViewById yourself. When you can just put those names in xml
And have the code auto generated in the background
k

krenvpravo

11/28/2017, 8:27 PM
Nobody doing findViewById() in 2017. And it is a pain to have names for half on screen size. Definition by delegation is the same, but long-unique ids binded to meaningful for current class properties and we don't have any code-generation overhead.
While kompiler-plugin is not slow for generation as well.
p

Paul Woitaschek

11/28/2017, 8:33 PM
@rkeazor I use databinding and there you just have a binding class for any included layout
r

rkeazor

11/28/2017, 10:59 PM
@krenvpravo What in the world are you talking about. Everybody is using findViewbyId in 2017 lol. Weather your using butterknife , and its being done behind the scenes, kotlin extention or databinding, and its being done in the generated code. As long as you have to find a view in xml, its most likely thru findviewbyid lol
Thats like someone saying , no one uses threads in 2017, they only use rx java lol
3 Views