Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile-Cn-Ko-En
Commits
741736f4
Commit
741736f4
authored
Oct 29, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update comparison list
parent
bcfb2a6d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
56 deletions
+251
-56
mobile/src/main/java/cn/garymb/ygomobile/ex_card/ExCardListAdapter.java
...n/java/cn/garymb/ygomobile/ex_card/ExCardListAdapter.java
+47
-54
mobile/src/main/java/cn/garymb/ygomobile/utils/ComparisonTableUtil.java
...n/java/cn/garymb/ygomobile/utils/ComparisonTableUtil.java
+204
-2
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ex_card/ExCardListAdapter.java
View file @
741736f4
package
cn.garymb.ygomobile.ex_card
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
URL_PRE_CARD
;
import
android.graphics.drawable.Drawable
;
import
android.util.Log
;
import
android.widget.ImageView
;
...
...
@@ -40,58 +38,53 @@ public class ExCardListAdapter extends BaseQuickAdapter<ExCardData, BaseViewHold
public
void
loadData
()
{
final
DialogPlus
dialog_read_ex
=
DialogPlus
.
show
(
getContext
(),
null
,
getContext
().
getString
(
R
.
string
.
fetch_ex_card
));
VUiKit
.
defer
().
when
(()
->
{
LogUtil
.
d
(
TAG
,
"start fetch"
);
List
<
ExCardData
>
exCardDataList
=
null
;
try
{
Response
response
=
OkhttpUtil
.
synchronousGet
(
ServerUtil
.
preCardListJson
(),
null
,
null
);
String
responseBodyString
=
response
.
body
().
string
();
Type
listType
=
new
TypeToken
<
List
<
ExCardData
>>()
{
}.
getType
();
Gson
gson
=
new
Gson
();
// Convert JSON to Java object using Gson
exCardDataList
=
gson
.
fromJson
(
responseBodyString
,
listType
);
}
catch
(
IOException
e
)
{
Log
.
e
(
TAG
,
"Error occured when fetching data from pre-card server"
);
return
null
;
}
if
(
exCardDataList
.
isEmpty
())
{
return
null
;
}
else
{
return
exCardDataList
;
}
})
.
fail
((
e
)
->
{
//关闭异常
if
(
dialog_read_ex
.
isShowing
())
{
try
{
dialog_read_ex
.
dismiss
();
}
catch
(
Exception
ex
)
{
}
}
LogUtil
.
i
(
TAG
,
"webCrawler fail"
);
})
.
done
((
exCardDataList
)
->
{
if
(
exCardDataList
!=
null
)
{
LogUtil
.
i
(
TAG
,
"webCrawler done"
);
getData
().
clear
();
addData
(
exCardDataList
);
notifyDataSetChanged
();
}
if
(
dialog_read_ex
.
isShowing
())
{
try
{
dialog_read_ex
.
dismiss
();
}
catch
(
Exception
ex
)
{
}
}
});
LogUtil
.
d
(
TAG
,
"start fetch"
);
List
<
ExCardData
>
exCardDataList
=
null
;
try
{
Response
response
=
OkhttpUtil
.
synchronousGet
(
ServerUtil
.
preCardListJson
(),
null
,
null
);
String
responseBodyString
=
response
.
body
().
string
();
Type
listType
=
new
TypeToken
<
List
<
ExCardData
>>()
{
}.
getType
();
Gson
gson
=
new
Gson
();
// Convert JSON to Java object using Gson
exCardDataList
=
gson
.
fromJson
(
responseBodyString
,
listType
);
}
catch
(
IOException
e
)
{
Log
.
e
(
TAG
,
"Error occured when fetching data from pre-card server"
);
return
null
;
}
if
(
exCardDataList
.
isEmpty
())
{
return
null
;
}
else
{
return
exCardDataList
;
}
}).
fail
((
e
)
->
{
Log
.
e
(
"seesee"
,
e
+
""
);
if
(
dialog_read_ex
.
isShowing
())
{
//关闭异常
try
{
dialog_read_ex
.
dismiss
();
}
catch
(
Exception
ex
)
{
}
}
LogUtil
.
i
(
TAG
,
"webCrawler fail"
);
}).
done
((
exCardDataList
)
->
{
Log
.
w
(
"seesee"
,
exCardDataList
+
""
);
if
(
exCardDataList
!=
null
)
{
LogUtil
.
i
(
TAG
,
"webCrawler done"
);
getData
().
clear
();
addData
(
exCardDataList
);
notifyDataSetChanged
();
}
if
(
dialog_read_ex
.
isShowing
())
{
try
{
dialog_read_ex
.
dismiss
();
}
catch
(
Exception
ex
)
{
}
}
});
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/ComparisonTableUtil.java
View file @
741736f4
...
...
@@ -322,7 +322,108 @@ public interface ComparisonTableUtil {
100224027
,
100224032
,
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
=
{
...
...
@@ -643,7 +744,108 @@ public interface ComparisonTableUtil {
43219114
,
89604813
,
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
};
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment