what is the correct way to use viewBinding in coustom view mainly extending ConstraintLayout or should i avoid it and use findViewById?
g
genovich
08/19/2020, 5:02 AM
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
flosch
08/19/2020, 5:45 AM
I think @genovich thaught you said
DataBinding
😛
Using
ViewBinding
is fine an generates very little overhead
âž• 1
g
genovich
08/19/2020, 5:48 AM
Ow, sorry =(
Really thought about dataBinding
j
jw
08/19/2020, 2:27 PM
Don't use Butter Knife. View binding was added in AGP 3.6.