2016年12月15日

EventBus的一些问题

摘要: 近期由于使用EventBus,但是出现从一个页面跳转到另一个页面,获取不到数据的情况 后来了解到,由于EventBus要先注册才能使用,但直接通过Intent跳转,由于加载页面需要时间 直接EventBus.getDefault().post("嗖的一下,就过去了"); 这样是不行的,必须给目标页面 阅读全文

posted @ 2016-12-15 16:15 若水无心 阅读(1773) 评论(1) 推荐(0) 编辑

2016年12月9日

fragmentTabHost 切换页面,首页的viewpager不显示的问题

摘要: 在初始化,viewpager的时候加非空判断 阅读全文

posted @ 2016-12-09 14:29 若水无心 阅读(320) 评论(0) 推荐(0) 编辑

2016年12月2日

设置recyclerview条目之间的距离

摘要: AppinfoiItemDecoration decor = new AppinfoiItemDecoration(); //设置条目的间距 recycler.addItemDecoration(decor); 复写 getItemOffsets 方法设置left right bottom 和top 的距离 @Override public void getItemOff... 阅读全文

posted @ 2016-12-02 17:00 若水无心 阅读(1122) 评论(0) 推荐(0) 编辑

2016年11月30日

Failed to resolve: com.android.support:appcompat-v7:22.2.1

摘要: 解决方法: 项目的build.gradle中 repositories { jcenter { url "http://jcenter.bintray.com/" } } 阅读全文

posted @ 2016-11-30 15:57 若水无心 阅读(316) 评论(0) 推荐(0) 编辑

2016年10月21日

studio中获取assets目录中的文件

摘要: 原文地址:http://blog.csdn.net/shifuhetudi/article/details/45006605 一开始在Android Studio中读取Assets目录下的资源的时候,用的是Eclipse下的getResource().getAssets().open("xxx.xm 阅读全文

posted @ 2016-10-21 19:41 若水无心 阅读(7989) 评论(0) 推荐(0) 编辑

2016年10月8日

studio中混淆代码时报错

摘要: Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForReleaseMinifyEnabled'.> java.io.IOException: Please correct the above 阅读全文

posted @ 2016-10-08 00:57 若水无心 阅读(5924) 评论(0) 推荐(0) 编辑

2016年10月5日

错误:无法启动守护进程:不能为对象堆预留足够的空间。

摘要: Error:Unable to start the daemon process: could not reserve enough space for object heap.Please assign more memory to Gradle in the project's gradle.p 阅读全文

posted @ 2016-10-05 19:22 若水无心 阅读(554) 评论(0) 推荐(0) 编辑

Android实战技巧:Fragment的那些坑(转)

摘要: 原文地址:http://toughcoder.net/blog/2015/04/30/android-fragment-the-bad-parts/?utm_source=tuicool&utm_medium=referral Fragment是Android在3.0(Homeycomb)版本时加入 阅读全文

posted @ 2016-10-05 12:48 若水无心 阅读(2112) 评论(0) 推荐(0) 编辑

2016年10月2日

fragment的通信之bundle

摘要: fragment之间通信除了通过activity之外还可以通过bundle来实现 取数据时用 阅读全文

posted @ 2016-10-02 22:23 若水无心 阅读(837) 评论(0) 推荐(0) 编辑

导航