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
486be731
Commit
486be731
authored
Apr 16, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示link箭头组
parent
493e07e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
1 deletion
+47
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
...rc/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
+47
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
View file @
486be731
...
...
@@ -73,6 +73,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
View
faq
;
private
View
addMain
;
private
View
addSide
;
private
View
linkArrow
;
private
TextView
cardcode
;
private
View
lb_setcode
;
private
ImageLoader
imageLoader
;
...
...
@@ -140,6 +141,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
close
=
bind
(
R
.
id
.
btn_close
);
cardcode
=
bind
(
R
.
id
.
card_code
);
level
=
bind
(
R
.
id
.
card_level
);
linkArrow
=
bind
(
R
.
id
.
detail_link_arrows
);
type
=
bind
(
R
.
id
.
card_type
);
faq
=
bind
(
R
.
id
.
btn_faq
);
cardAtk
=
bind
(
R
.
id
.
card_atk
);
...
...
@@ -282,6 +284,39 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
void
setCardInfo
(
Card
cardInfo
)
{
if
(
cardInfo
==
null
)
return
;
int
[]
enImgs
=
new
int
[]{
R
.
drawable
.
left_bottom_1
,
R
.
drawable
.
bottom_1
,
R
.
drawable
.
right_bottom_1
,
R
.
drawable
.
left_1
,
0
,
R
.
drawable
.
right_1
,
R
.
drawable
.
left_top_1
,
R
.
drawable
.
top_1
,
R
.
drawable
.
right_top_1
,
};
int
[]
disImgs
=
new
int
[]{
R
.
drawable
.
left_bottom_0
,
R
.
drawable
.
bottom_0
,
R
.
drawable
.
right_bottom_0
,
R
.
drawable
.
left_0
,
0
,
R
.
drawable
.
right_0
,
R
.
drawable
.
left_top_0
,
R
.
drawable
.
top_0
,
R
.
drawable
.
right_top_0
,
};
int
[]
ids
=
new
int
[]{
R
.
id
.
iv_1
,
R
.
id
.
iv_2
,
R
.
id
.
iv_3
,
R
.
id
.
iv_4
,
R
.
id
.
iv_6
,
R
.
id
.
iv_7
,
R
.
id
.
iv_8
,
R
.
id
.
iv_9
,
};
View
linkarrow
=
new
View
(
mContext
);
mCardInfo
=
cardInfo
;
imageLoader
.
bindImage
(
cardImage
,
cardInfo
.
Code
,
null
,
true
);
dialog
=
DialogUtils
.
getdx
(
context
);
...
...
@@ -327,9 +362,11 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
if
(
cardInfo
.
isType
(
CardType
.
Monster
))
{
if
(
cardInfo
.
isType
(
CardType
.
Link
))
{
level
.
setVisibility
(
View
.
INVISIBLE
);
level
.
setVisibility
(
View
.
GONE
);
linkArrow
.
setVisibility
(
View
.
VISIBLE
);
}
else
{
level
.
setVisibility
(
View
.
VISIBLE
);
linkArrow
.
setVisibility
(
View
.
GONE
);
}
atkdefView
.
setVisibility
(
View
.
VISIBLE
);
monsterlayout
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -347,6 +384,15 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
cardAtk
.
setText
((
cardInfo
.
Attack
<
0
?
"?"
:
String
.
valueOf
(
cardInfo
.
Attack
)));
if
(
cardInfo
.
isType
(
CardType
.
Link
))
{
cardDef
.
setText
((
cardInfo
.
getStar
()
<
0
?
"?"
:
"LINK-"
+
String
.
valueOf
(
cardInfo
.
getStar
())));
String
LineKey
=
String
.
valueOf
(
cardInfo
.
Defense
);
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
String
arrow
=
String
.
valueOf
(
LineKey
.
indexOf
(
i
));
if
(
arrow
.
equals
(
"1"
))
{
linkarrow
.
findViewById
(
ids
[
i
]).
setBackgroundResource
(
enImgs
[
i
]);
}
else
{
linkarrow
.
findViewById
(
ids
[
i
]).
setBackgroundResource
(
disImgs
[
i
]);
}
}
}
else
{
cardDef
.
setText
((
cardInfo
.
Defense
<
0
?
"?"
:
String
.
valueOf
(
cardInfo
.
Defense
)));
}
...
...
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