I'm about using `ButterKnife` for view binding, i ...
# android
p
I'm about using
ButterKnife
for view binding, i wanted to confirm if there is another(better) alternative provided by google itself?
s
im sure you know about kotlin synthetic or? https://kotlinlang.org/docs/tutorials/android-plugin.html
1
l
There’s DataBinding library from Google, but as Simon said, just use Kotlin synthetic properties if all you need is standard binding
👍 2
p
@Simon Schubert I guess We really learn everyday. I have gone through it Mostly this : https://antonioleiva.com/kotlin-android-extensions/ It really makes sense.
@Luka Yeah, i saw the android data binding library, but i really think that's pretty much about
data-binding
a
there are people that say that the only useful part of the data binding library is the view binding mechanism 😛
j
If only that part was separate...
u
data-binding and LiveData are great
🕺 1
r
@arekolek databinding is really good. Especially with live data
p
@rkeazor I'll prolly try out databinding in a future release but for now, i think i just need to remove
findViewById
and the variable declaration; it takes too much space in my code. 😉
r
@paulex you should, its really good in my opinion. it feels good not having to write a setVisibility/setText/setAnythingInView method ever lol.
😂 1
👍 1