what is the correct way to use viewBinding in cous...
# android
m
what is the correct way to use viewBinding in coustom view mainly extending ConstraintLayout or should i avoid it and use findViewById?
g
As I know, DataBinding have significant overhead, because of code generation. So I think that there is better to avoid using it unless you really do "binding". You have coupe of options: - use ViewBinding if you using android gradle plugin 4.0 - use kotlin-android-extensions (kotlin only) - use Butterknife from @jw (java)
🤔 1
f
I think @genovich thaught you said
DataBinding
😛 Using
ViewBinding
is fine an generates very little overhead
1
g
Ow, sorry =( Really thought about dataBinding
j
Don't use Butter Knife. View binding was added in AGP 3.6.