
android工具库
sdongwan
这个作者很懒,什么都没留下…
展开
-
butterknife官方文档翻译
butterknife使用原文链接:http://jakewharton.github.io/butterknife/github地址:https://github.com/JakeWharton/butterknife介绍ButterKnife使用@BindView和view ID 注解成员变量,自动地绑定你布局中对应的viewclass ExampleActivity extends Activ翻译 2017-03-20 01:54:33 · 661 阅读 · 0 评论 -
Eventbus 3官方文档翻译(一)
Eventbus 3官方文档翻译(一)eventbus3的使用(3 steps) Define events(定义事件) 事件定义只是使用POJO(普通旧式的java对象),没有其他的要求; public class MessageEvent { public final String message; public MessageEvent(String message) {翻译 2017-03-21 00:49:09 · 1166 阅读 · 0 评论 -
EventBus3官方文档翻译(二)
EventBus3官方文档翻译(二)Configuration(配置)EventBusBuilder类可以配置多样的EventBus,例如,配置一个静静的eventbus:post事件,没有订阅者;EventBus eventBus = EventBus.builder() .logNoSubscriberMessages(false) .sendNoSubscriberEvent(翻译 2017-03-21 01:04:09 · 535 阅读 · 0 评论 -
EventBus3使用实战(二)
EventBus3使用实战(二)EventBus3的使用实战(一) Sticky Event使用自己写了一个小例子,两个activity,通过EventBus来传递事件,布局比较简单,代码不贴出来了, MainActivity: SecondActivity: MainACtivity:public class MainActivity extends FragmentActivity { @原创 2017-03-21 22:43:17 · 802 阅读 · 0 评论 -
EventBus3的使用实战(一)
EventBus3的使用实战(一)eventbus2学习参考:http://blog.youkuaiyun.com/lmj623565791/article/details/40794879eventbus3与eventbus2的区别:eventbus2,在接收事件的方法名上使用约定的命名,通过方法的名字判定是否是接收事件的方法,以及在哪个线程处理事件,因此使用eventbus2时,要注意接收事件方法的命名,e原创 2017-03-21 00:44:06 · 499 阅读 · 0 评论 -
EventBus3官方文档翻译(三)
EventBus3官方文档翻译(三)Subscriber Index订阅者索引(index)是EventBus3的新特性,它是可选择的最佳化来加速初始化订阅者注册;订阅者索引在build时用EventBus 注解处理器创造,然而不是强制要求使用index,只是推荐使用,可以获得更好的性能; Index Preconditions(索引的前置条件) 只有订阅者和事件类是public时,才可以在@Sub翻译 2017-03-21 22:47:38 · 473 阅读 · 0 评论