how to work with recycleradapter ?
Hi skaiver, in the Migrating From Kotlin Synthetic Properties section you can see how to use View Binding in an adapter.
Hi, this is great, I have question though.
Should I use view binding even if I only have one (or two) button to interact with? or in this case findViewById() is much worth it? (in terms of performance and build time)
Hi Jasper, thanks for your question.
There’s no need to use ViewBinding and you can continue using findViewById if you are ok with it. Remember that under the hood every alternative, including ViewBinding, will use the good old findViewById.
However, in medium to large projects, using ViewBinding it’s nice to have the advantages such as null-safety and type-safety on all those views.
Also remember that if you enable ViewBinding, a class will be generated for all the xmls by default unless you explicitly state that you don’t want to use ViewBinding on that specific xml.
1 Like
This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!