Commit 741736f4 authored by fallenstardust's avatar fallenstardust

update comparison list

parent bcfb2a6d
package cn.garymb.ygomobile.ex_card; package cn.garymb.ygomobile.ex_card;
import static cn.garymb.ygomobile.Constants.URL_PRE_CARD;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.util.Log; import android.util.Log;
import android.widget.ImageView; import android.widget.ImageView;
...@@ -48,11 +46,8 @@ public class ExCardListAdapter extends BaseQuickAdapter<ExCardData, BaseViewHold ...@@ -48,11 +46,8 @@ public class ExCardListAdapter extends BaseQuickAdapter<ExCardData, BaseViewHold
Type listType = new TypeToken<List<ExCardData>>() { Type listType = new TypeToken<List<ExCardData>>() {
}.getType(); }.getType();
Gson gson = new Gson(); Gson gson = new Gson();
// Convert JSON to Java object using Gson // Convert JSON to Java object using Gson
exCardDataList = gson.fromJson(responseBodyString, listType); exCardDataList = gson.fromJson(responseBodyString, listType);
} catch (IOException e) { } catch (IOException e) {
Log.e(TAG, "Error occured when fetching data from pre-card server"); Log.e(TAG, "Error occured when fetching data from pre-card server");
return null; return null;
...@@ -64,23 +59,21 @@ public class ExCardListAdapter extends BaseQuickAdapter<ExCardData, BaseViewHold ...@@ -64,23 +59,21 @@ public class ExCardListAdapter extends BaseQuickAdapter<ExCardData, BaseViewHold
return exCardDataList; return exCardDataList;
} }
}) }).fail((e) -> {
.fail((e) -> { Log.e("seesee",e+"");
//关闭异常 if (dialog_read_ex.isShowing()) {//关闭异常
if (dialog_read_ex.isShowing()) {
try { try {
dialog_read_ex.dismiss(); dialog_read_ex.dismiss();
} catch (Exception ex) { } catch (Exception ex) {
} }
} }
LogUtil.i(TAG, "webCrawler fail"); LogUtil.i(TAG, "webCrawler fail");
})
.done((exCardDataList) -> {
}).done((exCardDataList) -> {
Log.w("seesee",exCardDataList+"");
if (exCardDataList != null) { if (exCardDataList != null) {
LogUtil.i(TAG, "webCrawler done"); LogUtil.i(TAG, "webCrawler done");
getData().clear(); getData().clear();
addData(exCardDataList); addData(exCardDataList);
notifyDataSetChanged(); notifyDataSetChanged();
......
...@@ -322,7 +322,108 @@ public interface ComparisonTableUtil { ...@@ -322,7 +322,108 @@ public interface ComparisonTableUtil {
100224027, 100224027,
100224032, 100224032,
100224033, 100224033,
100224034 100224034,
101207000,
101207001,
101207002,
101207003,
101207004,
101207005,
101207006,
101207007,
101207008,
101207009,
101207010,
101207011,
101207012,
101207013,
101207014,
101207015,
101207016,
101207017,
101207018,
101207019,
101207020,
101207021,
101207022,
101207023,
101207024,
101207025,
101207026,
101207027,
101207028,
101207029,
101207030,
101207031,
101207032,
101207033,
101207034,
101207035,
101207036,
101207037,
101207038,
101207039,
101207040,
101207041,
101207042,
101207043,
101207044,
101207045,
101207046,
101207047,
101207048,
101207049,
101207050,
101207051,
101207052,
101207053,
101207054,
101207055,
101207056,
101207057,
101207058,
101207059,
101207060,
101207061,
101207062,
101207063,
101207064,
101207065,
101207066,
101207067,
101207068,
101207069,
101207070,
101207071,
101207072,
101207073,
101207074,
101207075,
101207076,
101207077,
101207078,
101207079,
101207080,
100228001,
100225001,
100230401,
100200262,
101206081,
101206082,
101206083,
101206084,
101206085,
101206086,
101206087,
101206088,
101206089,
101206090,
101206091,
101206092,
101206093,
101206094,
101206095,
101206100
}; };
int[] newIDsArray = { int[] newIDsArray = {
...@@ -643,7 +744,108 @@ public interface ComparisonTableUtil { ...@@ -643,7 +744,108 @@ public interface ComparisonTableUtil {
43219114, 43219114,
89604813, 89604813,
16699558, 16699558,
42097666 42097666,
99217226,
3598351,
30583090,
76978105,
3376703,
39761418,
65155517,
2254222,
38648860,
65033975,
91438674,
37426272,
64911387,
90315086,
27704731,
63198739,
99193444,
26582143,
62076252,
99471856,
25865565,
52854600,
98248208,
24643913,
51132012,
87126721,
54611591,
81005500,
24521325,
50915474,
86304179,
13708888,
59893882,
86282581,
12686296,
58071334,
85065943,
11464648,
48958757,
84343351,
10732060,
47736165,
73121813,
10515412,
46014517,
72409226,
9453320,
45852939,
72246674,
4731783,
41739381,
77124096,
3519195,
30913809,
76302448,
3496543,
39881252,
65289956,
2674965,
38669664,
5063379,
31552317,
77946022,
4341721,
30339825,
67724434,
3129133,
39613288,
66002986,
2006591,
39491690,
65889305,
91284003,
38379052,
64767757,
91152455,
27556460,
63941169,
90939874,
26434972,
53829527,
42544773,
29325276,
47643326,
10218411,
23738096,
50123605,
86527709,
22916418,
59901153,
85395151,
12890860,
58288565,
84673574,
11677278,
43066927,
80551022,
16955631,
42940335,
19338434,
55733143
}; };
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment