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
ab454e06
Commit
ab454e06
authored
Dec 21, 2024
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
为随机卡片展示添加卡包展示信息
parent
89d3c398
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetailRandom.java
...n/java/cn/garymb/ygomobile/ui/cards/CardDetailRandom.java
+9
-2
mobile/src/main/res/layout/dialog_cardinfo.xml
mobile/src/main/res/layout/dialog_cardinfo.xml
+1
-1
mobile/src/main/res/layout/dialog_cardinfo_small.xml
mobile/src/main/res/layout/dialog_cardinfo_small.xml
+11
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetailRandom.java
View file @
ab454e06
...
...
@@ -13,6 +13,7 @@ import cn.garymb.ygomobile.lite.R;
import
cn.garymb.ygomobile.loader.ImageLoader
;
import
cn.garymb.ygomobile.utils.CardUtils
;
import
ocgcore.DataManager
;
import
ocgcore.PackManager
;
import
ocgcore.StringManager
;
import
ocgcore.data.Card
;
import
ocgcore.enums.CardType
;
...
...
@@ -20,6 +21,7 @@ import ocgcore.enums.CardType;
public
class
CardDetailRandom
{
private
final
View
viewCardDetail
;
private
final
ImageView
cardImage
;
private
final
TextView
pack_name
;
private
final
TextView
name
;
private
final
TextView
desc
;
private
final
TextView
level
;
...
...
@@ -32,6 +34,7 @@ public class CardDetailRandom {
private
final
View
atkdefView
;
private
final
View
textdefView
;
private
final
StringManager
mStringManager
;
private
final
PackManager
mPackManager
;
private
final
Context
mContext
;
private
static
CardDetailRandom
sCardDetailRandom
=
null
;
...
...
@@ -40,6 +43,7 @@ public class CardDetailRandom {
mContext
=
context
;
viewCardDetail
=
inflate
(
context
,
R
.
layout
.
dialog_cardinfo_small
,
null
);
cardImage
=
viewCardDetail
.
findViewById
(
R
.
id
.
card_image_toast
);
pack_name
=
viewCardDetail
.
findViewById
(
R
.
id
.
pack_name
);
name
=
viewCardDetail
.
findViewById
(
R
.
id
.
card_name_toast
);
monsterlayout
=
viewCardDetail
.
findViewById
(
R
.
id
.
star_attr_race_toast
);
level
=
viewCardDetail
.
findViewById
(
R
.
id
.
card_level_toast
);
...
...
@@ -53,12 +57,15 @@ public class CardDetailRandom {
desc
=
viewCardDetail
.
findViewById
(
R
.
id
.
text_desc_toast
);
mStringManager
=
DataManager
.
get
().
getStringManager
();
mPackManager
=
DataManager
.
get
().
getPackManager
();
pack_name
.
setText
(
mPackManager
.
findFileNameById
(
cardInfo
.
Alias
!=
0
?
cardInfo
.
Alias
:
cardInfo
.
Code
));
name
.
setText
(
cardInfo
.
Name
);
type
.
setText
(
CardUtils
.
getAllTypeString
(
cardInfo
,
mStringManager
).
replace
(
"/"
,
"|"
));
attrView
.
setText
(
mStringManager
.
getAttributeString
(
cardInfo
.
Attribute
));
if
(
cardInfo
.
Desc
.
length
()
>=
100
)
desc
.
setTextSize
(
10
);
if
(
cardInfo
.
Desc
.
length
()
>=
160
)
desc
.
setTextSize
(
9
);
if
(
cardInfo
.
Desc
.
length
()
>=
220
)
desc
.
setTextSize
(
8
);
if
(
cardInfo
.
Desc
.
length
()
>=
160
)
desc
.
setTextSize
(
8
);
if
(
cardInfo
.
Desc
.
length
()
>=
220
)
desc
.
setTextSize
(
6
);
desc
.
setText
(
cardInfo
.
Desc
);
if
(
cardInfo
.
isType
(
CardType
.
Monster
))
{
atkdefView
.
setVisibility
(
View
.
VISIBLE
);
...
...
mobile/src/main/res/layout/dialog_cardinfo.xml
View file @
ab454e06
...
...
@@ -194,7 +194,7 @@
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center_vertical"
android:maxLines=
"
1
"
android:maxLines=
"
2
"
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
android:textColor=
"@color/holo_blue_bright"
...
...
mobile/src/main/res/layout/dialog_cardinfo_small.xml
View file @
ab454e06
...
...
@@ -95,7 +95,17 @@
android:layout_height=
"match_parent"
android:background=
"@drawable/window2"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/pack_name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:gravity=
"center_vertical"
android:maxLines=
"2"
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
android:textColor=
"@color/holo_blue_bright"
tools:text=
"2024-12-21 25PP"
/>
<cn.garymb.ygomobile.ui.widget.AlwaysMarqueeTextView
android:id=
"@+id/card_name_toast"
android:layout_width=
"wrap_content"
...
...
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