-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Suggestion: Use View Binding instead of synthetic binding and findViewById #1088
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
@rosariopfernandes oh that's really cool! I had no idea this was available. I never liked Kotlin synthetic binding but I was trying to be one of the Kotlin Cool Kids 😎 |
Hahah, I see. Does that mean this is a go? |
Do we need to use any alpha/beta tooling or is this all powered by AGP
3.6.1 stable? If it's stable I'm good to go with this but I don't want our
devs to have to use AS Canary or anything like that.
…On Thu, Mar 26, 2020, 11:19 AM Rosário Pereira Fernandes < ***@***.***> wrote:
Hahah, I see. Does that mean this is a go?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACATB2R23CEKG437N77NFALRJNW6JANCNFSM4LUJVK7A>
.
|
ViewBinding is included in 3.6.1 stable. No need to use any alpha/beta tools. |
Ok then let's do it!
…On Thu, Mar 26, 2020 at 11:30 AM Rosário Pereira Fernandes < ***@***.***> wrote:
ViewBinding is included in 3.6.1 stable. No need to use any alpha/beta
tools.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1088 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACATB2S2OFL4IXU26FNW323RJNYIDANCNFSM4LUJVK7A>
.
|
I have noticed that using ViewBinding, the camera in Kotlin MLKit sample app is finally working |
@samtstern As I was implementing this, I noticed that some of our layouts only contain a single view (e.g. analytics/fragment_main.xml). I think for these cases it's simpler to use |
@rosariopfernandes I don't have a strong opinion here, I think either choice you could make for a single-view layout is a reasonable one! Whatever you think looks best as you implement is fine with me. |
(Our bot will not be happy with this issue)
Now that we're using Gradle 3.6.1, we could enable View Binding on our samples. Two reasons why I would recommend this change:
findViewById
, which would make our app implementation simpler, since it's meant for demonstration purposes.The text was updated successfully, but these errors were encountered: