- 博客(2)
- 资源 (1)
- 收藏
- 关注
原创 Handler的正确使用,防止内存泄漏
如果Handler使用不当,会导致内存泄漏,直至内存溢出。因此,为了避免这种情况的发生,Handler要定义为static的,并且要是弱引用。
2017-02-16 09:25:47 797
原创 ButterKnife使用详解
1.在app目录的gradle中添加compile 'com.jakewharton:butterknife:8.5.1' annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'2.(1)在Activity的onCreate方法中的setContentView()方法后面添加一句代码:ButterKnife.bind(this
2017-02-15 16:15:42 420
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人