小記

// 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);
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章