Whats new in Butterknife 8.5 ?
Hello Droiders !!!
I am sure, you all have been using Butter Knife, and I know you love it. Many Thanks to Jake Wharton, for writing such a beautiful library.
Took few minutes to update with you all with a small update.
Butter Knife just got updated to 8.5.1 (by the time I am writing this blog).
How to integrate it ?
1. Add the plugin to your build.gradle (Project):
2. Apply this in your module in build.gradle(Module: app) as:
apply plugin: 'com.jakewharton.butterknife'
Then Add below as dependencies:
Whats new in it ?
Well, change is in the way we use it.
Previously, we used R in ButterKnife annotations, lets say,
@BindView(R.id.textView) TextView mTextView;
Now, we simply have to use R2 in ButterKnife annotations as,
@BindView(R2.id.textView) TextView mTextView;
As far as I can understand, this new library is going to maintain its own version of mapping of ids, its own R.java (R2).
For the one who just cares about using it, there’s no major change, just use R2 instead of R.
Thanks for visiting…!!!