Android Studio插件之快速findViewById butterknife和Android CodeGenerator的使用

Android Studio插件之快速findViewById(butterknife和Android CodeGenerator的使用)

首先在设置里面的Plugins里面下载安装插件:

Android Studio插件之快速findViewById butterknife和Android CodeGenerator的使用

 

安装之后会提示重启,

然后就是怎么使用了:

butterknife的使用:

首先在build.gradle(app)里面添加这句话:

compile 'com.jakewharton:butterknife:7.0.1'

Android Studio插件之快速findViewById butterknife和Android CodeGenerator的使用

 

然后重新编译,进入activity中,选择布局文件R.layout.activity_main点击快捷键alt+shift+(0数字键)选择Butterknife

Android Studio插件之快速findViewById butterknife和Android CodeGenerator的使用

 选择之后会弹出以下的对话框:

Android Studio插件之快速findViewById butterknife和Android CodeGenerator的使用

 

 选择你要find的控件,然后提交就可以了。