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
7bc09cfa
Commit
7bc09cfa
authored
Jul 01, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断deckinfo为null时的处理
parent
2e021726
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
44 deletions
+45
-44
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
...java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
+44
-43
No files found.
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
View file @
7bc09cfa
...
@@ -27,7 +27,7 @@ public class DeckInfo {
...
@@ -27,7 +27,7 @@ public class DeckInfo {
public
File
source
;
public
File
source
;
private
int
mainCount
,
extraCount
,
sideCount
;
private
Integer
mainCount
,
extraCount
,
sideCount
;
public
DeckInfo
()
{
public
DeckInfo
()
{
mainCards
=
new
ArrayList
<>();
mainCards
=
new
ArrayList
<>();
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
View file @
7bc09cfa
...
@@ -81,7 +81,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
...
@@ -81,7 +81,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
holder
.
cardImage
.
setVisibility
(
View
.
VISIBLE
);
holder
.
cardImage
.
setVisibility
(
View
.
VISIBLE
);
imageLoader
.
bindImage
(
holder
.
cardImage
,
deckFile
.
getFirstCode
(),
ImageLoader
.
Type
.
middle
);
imageLoader
.
bindImage
(
holder
.
cardImage
,
deckFile
.
getFirstCode
(),
ImageLoader
.
Type
.
middle
);
//填入内容
//填入内容
if
(
deckInfo
.
getMainCount
()
!=
null
)
{
if
(
deckInfo
!=
null
)
{
holder
.
main
.
setText
(
String
.
valueOf
(
deckInfo
.
getMainCount
()));
holder
.
main
.
setText
(
String
.
valueOf
(
deckInfo
.
getMainCount
()));
if
(
deckInfo
.
getMainCount
()
<
40
)
{
if
(
deckInfo
.
getMainCount
()
<
40
)
{
holder
.
main
.
setTextColor
(
Color
.
YELLOW
);
holder
.
main
.
setTextColor
(
Color
.
YELLOW
);
...
@@ -94,13 +94,13 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
...
@@ -94,13 +94,13 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
holder
.
main
.
setText
(
"-"
);
holder
.
main
.
setText
(
"-"
);
holder
.
main
.
setTextColor
(
Color
.
RED
);
holder
.
main
.
setTextColor
(
Color
.
RED
);
}
}
if
(
deckInfo
.
getExtraCount
()
!=
null
)
{
//有时候主卡数量是空指,原因待查,暂且空指时显示红色“-”
if
(
deckInfo
!=
null
)
{
//有时候主卡数量是空指,原因待查,暂且空指时显示红色“-”
holder
.
extra
.
setText
(
String
.
valueOf
(
deckInfo
.
getExtraCount
()));
holder
.
extra
.
setText
(
String
.
valueOf
(
deckInfo
.
getExtraCount
()));
}
else
{
}
else
{
holder
.
extra
.
setText
(
"-"
);
holder
.
extra
.
setText
(
"-"
);
holder
.
extra
.
setTextColor
(
Color
.
RED
);
holder
.
extra
.
setTextColor
(
Color
.
RED
);
}
}
if
(
deckInfo
.
getSideCount
()
!=
null
)
{
if
(
deckInfo
!=
null
)
{
holder
.
side
.
setText
(
String
.
valueOf
(
deckInfo
.
getSideCount
()));
holder
.
side
.
setText
(
String
.
valueOf
(
deckInfo
.
getSideCount
()));
}
else
{
}
else
{
holder
.
side
.
setText
(
"-"
);
holder
.
side
.
setText
(
"-"
);
...
@@ -111,7 +111,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
...
@@ -111,7 +111,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
}
else
{
}
else
{
holder
.
ll_extra_n_side
.
setVisibility
(
View
.
VISIBLE
);
holder
.
ll_extra_n_side
.
setVisibility
(
View
.
VISIBLE
);
}
}
if
(
deckInfo
!=
null
)
{
//判断是否含有先行卡
//判断是否含有先行卡
Deck
deck
=
this
.
deckInfo
.
toDeck
();
Deck
deck
=
this
.
deckInfo
.
toDeck
();
List
<
String
>
strList
=
new
ArrayList
<>();
List
<
String
>
strList
=
new
ArrayList
<>();
...
@@ -162,6 +162,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
...
@@ -162,6 +162,7 @@ public class DeckListAdapter<T extends TextSelect> extends BaseQuickAdapter<T, D
}
}
}
}
}
}
}
//多选
//多选
if
(
isManySelect
)
{
if
(
isManySelect
)
{
if
(
selectList
.
contains
(
item
))
if
(
selectList
.
contains
(
item
))
...
...
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