// int p; 对请求的数据分组加载
if(5*p<list.size()){ for (int n=(5*p-5);n<5*p;n++){ list1.add(list.get(n)); } }else { for (int nn=(5*p-5);nn<list.size();nn++){ list1.add(list.get(nn)); } }
//请求当前日期时间 str
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date date = new Date(System.currentTimeMillis()); String str = format.format(date);
//截取
String a="http://upload"; String b=a.substring(a.indexOf(""),a.lastIndexOf("upload")); if (b.equals("http://")){ Glide.with(getApplicationContext()).load(UserBean.TUPIAN1+pic_small) .placeholder(R.mipmap.login).into(headAvatar); }
//最新版本 implementation 'com.alibaba:fastjson:1.1.55.android'