github地址:https://github.com/GarsonZhang/butterknife Butter Knife Field and method binding for Android views which uses annotation processing to generate boilerplate code for you. Eliminate findViewById calls by using @BindView on fields. Group multip…
Introduction Annotate fields with @InjectView and a view ID for Butter Knife to find and automatically cast the corresponding view in your layout. class ExampleActivity extends Activity { @InjectView(R.id.title) TextView title; @InjectView(R.id.subti…
Butter Knife Github地址: https://github.com/JakeWharton/butterknife 官方说明给出的解释是 Bind Android views and callbacks to fields and methods. Field and method binding for Android views which uses annotation processing to generate boilerplate code for you. Eli…
There is a guy. He wants to drink 12 cups of green peanut butter. He needs green peanut butter. So he goes to Starbucks. He tells the clerk, I will have 12 large cups of green peanut butter. The clerk says, We don't have green peanut butter at StarBu…
Google Guice on Android(RoboGuice) 今天介绍一下Google的这个开源框架RoboGuice, 它的作用跟之前讲过的Dagger框架差点儿是一样的,仅仅是Dagger比它的功能更强大一些. Dagger通过专注于一种简化的功能集以一种不同的方式达到了更好的性能.有人觉得RoboGuice节约了大量的时间.较少的代码意味着较少的错误.较少的样板代码意味着能够把很多其它的时间放到应用的核心逻辑上.所以这就是为什么我们要使用这些开源框架来开发的原因. 以下我…