摘要: 1.添加依赖:compile 'com.cjj.materialrefeshlayout:library:1.3.0' 2.布局中添加控件,包裹list控件 <com.cjj.MaterialRefreshLayout xmlns:android="http://schemas.android.co 阅读全文
posted @ 2017-04-24 20:10 内涵馒头 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖: compile files('libs/image-loader.jar') 2.清单文件中注册初始化 初始化public static void initImageLoader(Context context) { // This configuration tuning is c 阅读全文
posted @ 2017-04-24 20:09 内涵馒头 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖: compile 'com.yanzhenjie.nohttp:nohttp:1.1.1' 2.注册初始化 NoHttp.initialize(this); Logger.setDebug(true);// 开启NoHttp的调试模式, 配置后可看到请求过程、日志和错误信息。上线后改为 阅读全文
posted @ 2017-04-24 20:08 内涵馒头 阅读(501) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖:compile 'org.xutils:xutils:3.5.0' 2.清单文件中注册初始化 初始化:x.Ext.init(this); x.Ext.setDebug(BuildConfig.DEBUG); // 是否输出debug日志, 开启debug会影响性能.//上线后参数设为f 阅读全文
posted @ 2017-04-24 20:08 内涵馒头 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖:compile 'com.android.support:cardview-v7:24.2.1' 2.在布局中添加控件: <android.support.v7.widget.CardView> </android.support.v7.widget.CardView> 3.布局中的常 阅读全文
posted @ 2017-04-24 20:07 内涵馒头 阅读(589) 评论(0) 推荐(0) 编辑
摘要: 1.使用gson需添加的依赖: compile 'com.google.code.gson:gson:2.2.4' 2.初始化gson:Gson mGson = new Gson(); 3.创建封装类 4.解析时需要传入两个参数(json数据;封装实体类) 例:TextBean bean = mGs 阅读全文
posted @ 2017-04-24 20:07 内涵馒头 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖:compile 'com.squareup.picasso:picasso:2.5.2' 2.加载图片: 用到的参数包含(上下文; 图片数据 ;自定义图片大小; 加载默认图片;控件对象 ) Picasso.with(MainActivity.this).load("http://img 阅读全文
posted @ 2017-04-24 20:07 内涵馒头 阅读(237) 评论(0) 推荐(0) 编辑
摘要: 1.添加依赖:compile 'com.zhy:okhttputils:2.6.2' 2.清单文件中注册初始化: 初始化:OkHttpClient okHttpClient = new OkHttpClient.Builder() // .addInterceptor(new LoggerInter 阅读全文
posted @ 2017-04-24 20:06 内涵馒头 阅读(3079) 评论(0) 推荐(0) 编辑
摘要: 关于布局1.添加依赖 2.添加<android.support.v7.widget.RecyclerView></android.support.v7.widget.RecyclerView> 关于Activity 1.初始化RecyclerView 2.创建RecyclerView适配器 1)继承 阅读全文
posted @ 2017-04-24 20:05 内涵馒头 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 关于布局: 1.添加依赖com.android.support:design:24.2.1 2.由<android.support.design.widget.CoordinatorLayout/>包裹整体滑动视图 3.由<android.support.design.widget.AppBarLa 阅读全文
posted @ 2017-04-24 20:04 内涵馒头 阅读(639) 评论(0) 推荐(0) 编辑