本文csdn地址:http://blog.csdn.net/picasso_l/article/details/50548151
JakeWharton 的butterknife幫我們有效的解決了findViewById及各種view的監(jiān)聽事件泛濫的問題,極大的簡化了代碼,如果使用了android Studio開發(fā)的配上avast的android-butterknife-zelezny插件,則可以一鍵注解所有view,極大提高編碼效率。
1、安裝
1.Android studio File->Settings..->Plugins–>Browse repositores..搜索Android Butterknife Zelezny
2.安裝插件,重啟android studio
2、使用下面看一下android-butterknife-zelezny結合butterknife的demo
注意這里,是在layout上面右擊,出來的選項。
參考文獻:
推薦幾款實用的Android Studio 插件