-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DISCUSSION] Use Kotlin Android Extensions instead of Butterknife #3530
Comments
I am in favour of using Kotlin Android Extensions ViewBinding for all the Android components that are written in Kotlin. IMO our goal should be to gradually remove all usages of Butterknife. Whenever an existing Android component which is written in Java is converted to Kotlin, we should ideally replace Butterknife with Kotlin Android Extensions ViewBinding. Let's wait for what others think about this and then we can make this part of our contributor guidelines. |
This sounds good to me. |
@misaochan Do we need to wait for more opinions on this or if everyone agrees then we can unblock #3524. |
Let's just get @ashishkumar468 's opinion, we should be good after that since this is a relatively minor policy. |
Agree with @maskaravivek 's opinion, I am okay to go with this, read the docs, supports both View Caching and Layout Containers (so that classes like ViewHolders can also be used as an extension container). |
A minor xml style point now that it seems we are all in agreement. Should we start writing our |
I think that should be okay. |
@maskaravivek if you are okay with it then I will consider this issue closed |
Updating the doc based on the discussion in commons-app/apps-android-commons#3530
Once the liked PR is merged, we can close this issue. |
Updating the doc based on the discussion in commons-app/apps-android-commons#3530
I was reading the docs, and the layout container support is experimental, are we okay with that? |
It has been experimental since it released and has seen no real change over the 2 years I have been using it in production. It is also not "experimental" in the same way they mark APIs |
Kotlin Android extensions looks to be being deprecated in favour of view binding for Android. However, looks like support will only be dropped in September 2021 https://android-developers.googleblog.com/2020/11/the-future-of-kotlin-android-extensions.html |
Summary:
In kotlin we have the option of using Kotlin Android Extensions ViewBinding
I am in favour of their usage for their ease of use.
The alternatives are:
The text was updated successfully, but these errors were encountered: