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
69d41059
Commit
69d41059
authored
Jun 03, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
int 改 integer使之能判断null
parent
7d2c4ed7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
+3
-3
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
...java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
+3
-3
No files found.
mobile/src/main/java/cn/garymb/ygomobile/bean/DeckInfo.java
View file @
69d41059
...
@@ -195,15 +195,15 @@ public class DeckInfo {
...
@@ -195,15 +195,15 @@ public class DeckInfo {
sideCount
=
Math
.
min
(
sideCards
.
size
(),
Constants
.
DECK_SIDE_MAX
);
sideCount
=
Math
.
min
(
sideCards
.
size
(),
Constants
.
DECK_SIDE_MAX
);
}
}
public
int
getMainCount
()
{
public
Integer
getMainCount
()
{
return
mainCount
;
return
mainCount
;
}
}
public
int
getExtraCount
()
{
public
Integer
getExtraCount
()
{
return
extraCount
;
return
extraCount
;
}
}
public
int
getSideCount
()
{
public
Integer
getSideCount
()
{
return
sideCount
;
return
sideCount
;
}
}
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/adapters/DeckListAdapter.java
View file @
69d41059
...
@@ -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
(
String
.
valueOf
(
deckInfo
.
getMainCount
())
!=
null
)
{
if
(
deckInfo
.
getMainCount
()
!=
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
(
String
.
valueOf
(
deckInfo
.
getExtraCount
()
)
!=
null
)
{
//有时候主卡数量是空指,原因待查,暂且空指时显示红色“-”
if
(
deckInfo
.
getExtraCount
(
)
!=
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
(
String
.
valueOf
(
deckInfo
.
getSideCount
()
)
!=
null
)
{
if
(
deckInfo
.
getSideCount
(
)
!=
null
)
{
holder
.
side
.
setText
(
String
.
valueOf
(
deckInfo
.
getSideCount
()));
holder
.
side
.
setText
(
String
.
valueOf
(
deckInfo
.
getSideCount
()));
}
else
{
}
else
{
holder
.
side
.
setText
(
"-"
);
holder
.
side
.
setText
(
"-"
);
...
...
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