- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 Recyclerview分组悬停
final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this); RelistAdapter adapter = new RelistAdapter(); recyclerView.setLayoutManager(linearLayoutManager); ...
2018-05-15 10:50:02
806
原创 Android中将固定的文本复制到剪切板
此方法要导入的包:import android.content.ClipboardManager;ClipboardManager copy = (ClipboardManager) MainActivity.this .getSystemService(Context.CLIPBOARD_SERVICE);copy.setText(orderInfo.getOrderNo() ...
2018-05-12 09:38:31
320
原创 OkHttp封装
public class OkHttpUtils { /** * 单例设计模式 * 1、构造函数私有化 * 2、提供一个公有的、静态、返回值类型是当前类的对象的方法 */ private static OkHttpUtils okHttpUtils; private OkHttpClient okHttpClient;//单例OKhttpCl...
2018-03-14 09:57:42
161
原创 Retrfit思路
Retrfit步骤1:添加retrfit和Gson依赖2:创建接口类,创建抽象方法,返回值为Call对象,泛型为创建的java实体类3:如果是GET请求在抽象方法上使用@GET("接口地址")4:创建Retrfit对象,配置服务器 【new Retrfit.Builder().basrurl("服务器地址")】5:通过动态代理创建接口对象6:Call对象网络访问
2018-03-13 21:05:44
229
原创 NetworkImageView+Lru缓存
RequestQueue requestQueue = Volley.newRequestQueue(context); Log.e("图片网址", list.get(position).getImage());// 此处的new Cache()是下面的匿名内部类 ImageLoader imageLoader = new ImageLoader(r
2018-03-13 20:50:21
157
原创 OkHttp网络架构
使用步骤:到依赖先 // 创建OkHttpClient对象 OkHttpClient client = new OkHttpClient.Builder().build();// 创建Request对象,// URLDATA——请求的网址 Request request = new Request.Bui...
2018-03-13 19:54:08
206
读取手机所有文件
2018-08-13
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人