u3shadow / RemoveButterKnife

An Android Studio plugin to help remove use of ButterKnife
GNU General Public License v3.0
352 stars 28 forks source link

Now replacing ButterKnife.bind call with findViewById() so it works o… #11

Closed JonWatson closed 7 years ago

JonWatson commented 7 years ago

…n a wider variety of class types

Thanks for your work on this! I noticed that some improvements could be made. The main problem is that it was only working on Activity's for me, but we needed this to work on any class that was using ButterKnife(Dialog, View, Fragment, etc.)

So I modified the plugin so that it replaces the ButterKnife.bind() with the findViewById's, rather than searching for specific keywords like "setContentView" etc. It also now removes the empty lines left after removing imports, etc and has some other minor format changes.

I think it would be worth pushing this new .jar up to the repo for others to enjoy. Thanks again!