holder.imgTwo.setVisibility(View.GONE);
holder.imgThree.setVisibility(View.GONE);
Glide.with(MainApplication.context)
.load(MainApplication.CDN +thumUrl)
.into(holder.imgVideo);
holder.imgVideo.setOnClickListener(v->{
try {
if (!datas.get(position).getString("id").equals("") && null != datas.get(position).getString("id")) {
Intent intent = new Intent(finalConvertView1.getContext(), SingleCommentActivity.class);
intent.putExtra("id", datas.get(position).getString("id"));
finalConvertView1.getContext().startActivity(intent);
}
} catch (JSONException e) {
e.printStackTrace();
}
});
}
}else {
holder.imgVideo.setVisibility(View.GONE);
holder.imgStart.setVisibility(View.GONE);
if (!fileUrl.equals("")) {
holder.iv_commentPic.setVisibility(View.VISIBLE);
holder.imgLayout.setVisibility(View.VISIBLE);
Picasso.with(MainApplication.context)
.load(MainApplication.url + "/zhannew/uploadfile/"+fileUrl)
.into(holder.iv_commentPic);
} else {
holder.iv_commentPic.setVisibility(View.GONE);
holder.imgLayout.setVisibility(View.GONE);
}
if (!file2Url.equals("")) {
holder.imgTwo.setVisibility(View.VISIBLE);
Picasso.with(MainApplication.context)
.load(MainApplication.url + "/zhannew/uploadfile/"+file2Url)
.into(holder.imgTwo);
} else {
holder.imgTwo.setVisibility(View.GONE);
}
if (!file3Url.equals("")) {
holder.imgThree.setVisibility(View.VISIBLE);
Picasso.with(MainApplication.context)
.load(MainApplication.url + "/zhannew/uploadfile/"+file3Url)
.into(holder.imgThree);
} else {
holder.imgThree.setVisibility(View.GONE);
}
String[] fileUrlArray = null;
if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url) &&!TextUtils.isEmpty(file3Url)){
fileUrlArray =new String[]{
MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
MainApplication.url + "/zhannew/uploadfile/"+file2Url,
MainApplication.url + "/zhannew/uploadfile/"+file3Url
};
}else if (!TextUtils.isEmpty(fileUrl) && !TextUtils.isEmpty(file2Url)){
fileUrlArray =new String[]{
MainApplication.url + "/zhannew/uploadfile/"+fileUrl,
MainApplication.url + "/zhannew/uploadfile/"+file2Url
};
}else if (!TextUtils.isEmpty(fileUrl)){
fileUrlArray =new String[]{ MainApplication.url + "/zhannew/uploadfile/"+fileUrl};
}
final View finalConvertView2 = convertView;
String[] finalFileUrlArray = fileUrlArray;
holder.iv_commentPic.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
// 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, s);
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 0);
finalConvertView2.getContext().startActivity(intent);
}
});
} else {
holder.iv_commentPic.setVisibility(View.GONE);
holder.imgTwo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
// 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 1);
finalConvertView2.getContext().startActivity(intent);
}
});
holder.imgThree.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(finalConvertView2.getContext(), ImagePagerActivity.class);
// 图片url,为了演示这里使用常量,一般从数据库中或网络中获取
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_URLS, finalFileUrlArray);
intent.putExtra(ImagePagerActivity.EXTRA_IMAGE_INDEX, 2);
finalConvertView2.getContext().startActivity(intent);
}
});
}
//设置删除
String userid = datas.get(position).getString("userid");
final String id = datas.get(position).getString("id");
@ -505,11 +617,11 @@ public class ZhanCommentsAapter extends BaseAdapter {
TextView tv_pdelete, tv_pname, tv_sname, tv_ptime, tv_stime, tv_pcontext, tv_scontext, tv_preply, tv_pcar, tv_more, tv_pzan;
ImageView iv_picon, certified_icon, high_grade_comment_icon;
LinearLayout ll_pzan;
ImageView iv_havemessage, iv_commentPic;
ImageView iv_havemessage, iv_commentPic,imgTwo,imgThree,imgVideo,imgStart;
ImageView iv_pgrade, iv_pzan, iv_level_img;
TagFlowLayout fl_ptag;
ListView lv_scomment;
RelativeLayout parent;
RelativeLayout parent,imgLayout;
View vvv;
}
|
||
| 97 | 97 |
|
| 98 | 98 |
|
| 99 | 99 |
|
| 100 |
|
|
| 100 |
|
|
| 101 | 101 |
|
| 102 | 102 |
|
| 103 | 103 |
|
|
||
| 6 | 6 |
|
| 7 | 7 |
|
| 8 | 8 |
|
| 9 |
|
|
| 10 |
|
|
| 9 | 11 |
|
| 10 | 12 |
|
| 11 | 13 |
|
|
||
| 10 | 10 |
|
| 11 | 11 |
|
| 12 | 12 |
|
| 13 |
|
|
| 13 | 14 |
|
| 14 | 15 |
|
| 15 | 16 |
|
| 16 |
|
|
| 17 |
|
|
| 17 | 18 |
|
| 18 | 19 |
|
| 19 | 20 |
|
|
||
| 8 | 8 |
|
| 9 | 9 |
|
| 10 | 10 |
|
| 11 |
|
|
| 11 |
|
|
| 12 | 12 |
|
| 13 | 13 |
|
| 14 | 14 |
|
|
||
| 68 | 68 |
|
| 69 | 69 |
|
| 70 | 70 |
|
| 71 |
|
|
| 71 | 72 |
|
| 72 | 73 |
|
| 73 | 74 |
|
|
||
| 127 | 128 |
|
| 128 | 129 |
|
| 129 | 130 |
|
| 130 |
|
|
| 131 |
|
|
| 132 |
|
|
| 133 |
|
|
| 131 |
|
|
| 134 | 132 |
|
| 133 |
|
|
| 135 | 134 |
|
| 136 | 135 |
|
| 137 |
|
|
| 138 |
|
|
| 136 |
|
|
| 137 |
|
|
| 138 |
|
|
| 139 |
|
|
| 140 |
|
|
| 141 |
|
|
| 142 |
|
|
| 143 |
|
|
| 144 |
|
|
| 145 |
|
|
| 146 |
|
|
| 147 |
|
|
| 148 |
|
|
| 149 |
|
|
| 150 |
|
|
| 151 |
|
|
| 152 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
|
|
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 139 | 183 |
|
| 140 | 184 |
|
| 141 | 185 |
|
|
||
| 159 | 203 |
|
| 160 | 204 |
|
| 161 | 205 |
|
| 162 |
|
|
| 206 |
|
|
| 163 | 207 |
|
| 164 | 208 |
|
| 165 | 209 |
|
|
||
| 145 | 145 |
|
| 146 | 146 |
|
| 147 | 147 |
|
| 148 |
|
|
| 149 |
|
|
| 150 |
|
|
| 151 |
|
|
| 148 |
|
|
| 149 |
|
|
| 150 |
|
|
| 152 | 151 |
|
| 153 | 152 |
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
|
|
| 158 |
|
|
| 159 |
|
|
| 160 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
|
| 167 |
|
|
| 168 |
|
|
| 169 |
|
|
| 170 |
|
|
| 171 |
|
|
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
|
|
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
|
| 183 |
|
|
| 184 |
|
|
| 185 |
|
|
| 186 |
|
|
| 187 |
|
|
| 188 |
|
|
| 189 |
|
|
| 190 |
|
|
| 191 |
|
|
| 192 |
|
|
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 |
|
|
| 198 |
|
|
| 199 |
|
|
| 157 | 200 |
|
| 158 | 201 |
|
| 159 | 202 |
|
| 160 | 203 |
|
| 161 | 204 |
|
| 162 |
|
|
| 205 |
|
|
| 163 | 206 |
|
| 164 | 207 |
|
| 165 | 208 |
|
|
||
| 170 | 213 |
|
| 171 | 214 |
|
| 172 | 215 |
|
| 216 |
|
|
| 173 | 217 |
|
| 174 | 218 |
|
| 175 | 219 |
|
|
||
| 187 | 231 |
|
| 188 | 232 |
|
| 189 | 233 |
|
| 190 |
|
|
| 234 |
|
|
| 191 | 235 |
|
| 192 | 236 |
|
| 193 | 237 |
|
|
||
| 217 | 261 |
|
| 218 | 262 |
|
| 219 | 263 |
|
| 264 |
|
|
| 220 | 265 |
|
| 221 | 266 |
|
| 222 | 267 |
|
| 223 |
|
|
| 268 |
|
|
| 224 | 269 |
|
| 225 | 270 |
|
| 226 | 271 |
|
|
||
| 236 | 281 |
|
| 237 | 282 |
|
| 238 | 283 |
|
| 284 |
|
|
| 239 | 285 |
|
| 240 | 286 |
|
| 241 | 287 |
|
|
||
| 248 | 294 |
|
| 249 | 295 |
|
| 250 | 296 |
|
| 297 |
|
|
| 251 | 298 |
|
| 252 | 299 |
|
| 253 | 300 |
|
|
||
| 260 | 307 |
|
| 261 | 308 |
|
| 262 | 309 |
|
| 310 |
|
|
| 263 | 311 |
|
| 264 | 312 |
|
| 265 | 313 |
|
|
||
| 272 | 320 |
|
| 273 | 321 |
|
| 274 | 322 |
|
| 323 |
|
|
| 275 | 324 |
|
| 276 | 325 |
|
| 277 | 326 |
|
|
||
| 296 | 345 |
|
| 297 | 346 |
|
| 298 | 347 |
|
| 348 |
|
|
| 299 | 349 |
|
| 300 | 350 |
|
| 301 | 351 |
|
|
||
| 352 | 402 |
|
| 353 | 403 |
|
| 354 | 404 |
|
| 355 |
|
|
| 405 |
|
|
| 356 | 406 |
|
| 357 | 407 |
|
| 358 | 408 |
|
|
||
| 82 | 82 |
|
| 83 | 83 |
|
| 84 | 84 |
|
| 85 |
|
|
| 85 | 86 |
|
| 86 | 87 |
|
| 87 | 88 |
|