|
@@ -338,24 +338,6 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
|
338
|
338
|
|
339
|
339
|
}
|
340
|
340
|
|
341
|
|
- @Override
|
342
|
|
- public void showDownLoad(int position,final View background,final ProgressBar progressBar, final int current) {
|
343
|
|
-
|
344
|
|
- progressBar.setProgress(current);
|
345
|
|
-
|
346
|
|
- if(current==100) {
|
347
|
|
-
|
348
|
|
- handler.post(new Runnable() {
|
349
|
|
- @Override
|
350
|
|
- public void run() {
|
351
|
|
- background.setVisibility(View.GONE);
|
352
|
|
- progressBar.setVisibility(View.GONE);
|
353
|
|
- }
|
354
|
|
- });
|
355
|
|
-
|
356
|
|
- SkinUtil.markDownload(position);
|
357
|
|
- }
|
358
|
|
- }
|
359
|
341
|
|
360
|
342
|
|
361
|
343
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
|
@@ -397,6 +379,37 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
|
397
|
379
|
PopupWindow popupWindow;
|
398
|
380
|
Handler handler;
|
399
|
381
|
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+ @Override
|
|
386
|
+ public void showDownLoad(RES res,int size,int position,final View background,final ProgressBar progressBar, final int current) {
|
|
387
|
+
|
|
388
|
+ if(size<2) {
|
|
389
|
+ size ++;
|
|
390
|
+ if(size==1) {
|
|
391
|
+ mPresenter.downLoadPic(res, background, progressBar, res.getMine_banner(), size, position);
|
|
392
|
+ }else if(size==2) {
|
|
393
|
+ mPresenter.downLoadPic(res, background, progressBar, res.getBanner(), size, position);
|
|
394
|
+ }
|
|
395
|
+ }
|
|
396
|
+ if(size==2) {
|
|
397
|
+ progressBar.setProgress(current);
|
|
398
|
+ if (current == 100) {
|
|
399
|
+ handler.post(new Runnable() {
|
|
400
|
+ @Override
|
|
401
|
+ public void run() {
|
|
402
|
+ background.setVisibility(View.GONE);
|
|
403
|
+ progressBar.setVisibility(View.GONE);
|
|
404
|
+ }
|
|
405
|
+ });
|
|
406
|
+
|
|
407
|
+ SkinUtil.markDownload(position);
|
|
408
|
+ }
|
|
409
|
+ }
|
|
410
|
+
|
|
411
|
+ }
|
|
412
|
+
|
400
|
413
|
private void showPopWindow() {
|
401
|
414
|
|
402
|
415
|
|
|
@@ -442,9 +455,11 @@ public class DetialFragment extends MVPFragment<DetialPresent, DetialModel> impl
|
442
|
455
|
progressBar.setVisibility(View.VISIBLE);
|
443
|
456
|
}
|
444
|
457
|
RES res = (RES) adapter.getData().get(position);
|
445
|
|
- mPresenter.downLoadPic(background,progressBar,res.getBanner(),2,position);
|
446
|
|
- mPresenter.downLoadPic(background,progressBar,res.getPreview_img(),0,position);
|
447
|
|
- mPresenter.downLoadPic(background,progressBar,res.getMine_banner(),1,position);
|
|
458
|
+
|
|
459
|
+ mPresenter.downLoadPic(res,background,progressBar,res.getPreview_img(),0,position);
|
|
460
|
+//
|
|
461
|
+// mPresenter.downLoadPic(background,progressBar,res.getBanner(),2,position);
|
|
462
|
+
|
448
|
463
|
}else {
|
449
|
464
|
SPUtil.putAndApply(getContext(), Constant.Skin.CHECKED, position);
|
450
|
465
|
adapter.notifyDataSetChanged();
|