https://kotlinlang.org logo
p

Peter Farlow

12/14/2020, 3:11 PM
I know that databinding includes the viewbinding, but is it possible to enable databinding and viewbinding in your project at the same time?
stackoverflow 1
o

okarm

12/14/2020, 3:29 PM
Have you tried to see what happens? If yes, post an error that you received to Stack Overflow with the appropriate tags - so that others may learn from your experiences as well. View/DataBinding errors should be resolved quite quickly there. Have you searched the Web for answers? If yes, what queries and search engines did you use and why hasn't it helped you? When I searched a service called Google for "android enable both data binding and view binding", the following results are the 4th and 5th, as personalized for me by Google's spygorithms: https://www.raywenderlich.com/6430697-view-binding-tutorial-for-android-getting-started#toc-anchor-010 https://stackoverflow.com/questions/58557650/databinding-not-work-together-with-viewbinding-in-kotlin I assume you found these articles too - before posting here? Is there a reason these articles haven't helped?
a

Ali Azaz Alam

12/14/2020, 4:51 PM
Hi @okarm from my perspective @Peter Farlow wants to ask our point of view on it.
@Peter Farlow I don't think so that the users want to enable both
databinding
and
viewbinding
in the same project because if we do dig into this topic we would get that both of the libraries used to remove the boilerplate code like
findViewById
or to replace some well-known extensions including
ButterKnife.
You can do check the documentation for both of them to see which one is best in your case. 🙂
4 Views