Skip to content
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

Remove use of Butterknife #1178

Closed
veyndan opened this issue Mar 5, 2018 · 6 comments
Closed

Remove use of Butterknife #1178

veyndan opened this issue Mar 5, 2018 · 6 comments

Comments

@veyndan
Copy link
Collaborator

veyndan commented Mar 5, 2018

This issue is kind of related to #1147. @Meisolsson stated:

When I am the first thing to be changed will be the Gropie items since the ViewHolders can be generated by the kotlin android extension.

This issue focuses on the broader idea that the Kotlin Android Extension should generate all the view bindings (instead of just for ViewHolders), ultimately making Butterknife redundant.

The two main benefits to doing this is:

  • Shorter code: @BindView no longer needs to plague the codebase.
  • Compile time type safety: accessing views in the hierarchy is typed automatically.
@Meisolsson
Copy link
Contributor

Yeah, when we start moving Items to Kotlin we should do this. It might take another couple of week for me to get there since I have exams coming up.

@veyndan
Copy link
Collaborator Author

veyndan commented Mar 5, 2018

Would you mind if I just started converting the files containing ButterKnife annotations over to Kotlin?

@Meisolsson
Copy link
Contributor

Actually, just do all of it. Item and the rest. I'll find other things to do later.

@veyndan
Copy link
Collaborator Author

veyndan commented Mar 5, 2018

When you say Item and the rest, do you mean convert every Java file to Kotlin? Or just the ones containing Butterknife annotations?

@Meisolsson
Copy link
Contributor

Not all of the project, just the files where we make use of ButterKnife.

Also we should probably use the view caching, not sure if it's in experimental or not but either way it would be good.

@veyndan
Copy link
Collaborator Author

veyndan commented Mar 5, 2018

It seems to be turned on by default, similar to how Butterknife is..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants