Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
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
Commits
e581b132
Commit
e581b132
authored
Jul 18, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据效果文字数改变字体大小
parent
c14c221a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
17 deletions
+22
-17
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetailRandom.java
...n/java/cn/garymb/ygomobile/ui/cards/CardDetailRandom.java
+4
-1
mobile/src/main/res/layout/dialog_cardinfo_small.xml
mobile/src/main/res/layout/dialog_cardinfo_small.xml
+18
-16
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetailRandom.java
View file @
e581b132
...
...
@@ -55,6 +55,9 @@ public class CardDetailRandom {
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
);
desc
.
setText
(
cardInfo
.
Desc
);
if
(
cardInfo
.
isType
(
CardType
.
Monster
))
{
atkdefView
.
setVisibility
(
View
.
VISIBLE
);
...
...
@@ -70,7 +73,7 @@ public class CardDetailRandom {
//连接怪兽设置
if
(
cardInfo
.
isType
(
CardType
.
Link
))
{
level
.
setVisibility
(
View
.
GONE
);
textdefView
.
setVisibility
(
View
.
GON
E
);
textdefView
.
setVisibility
(
View
.
INVISIBL
E
);
cardDef
.
setText
((
cardInfo
.
getStar
()
<
0
?
"?"
:
"LINK-"
+
String
.
valueOf
(
cardInfo
.
getStar
())));
}
else
{
level
.
setVisibility
(
View
.
VISIBLE
);
...
...
mobile/src/main/res/layout/dialog_cardinfo_small.xml
View file @
e581b132
...
...
@@ -5,9 +5,9 @@
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"
150dp
"
android:layout_width=
"
wrap_content
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"1
0
dp"
android:layout_marginLeft=
"1
5
dp"
android:layout_marginTop=
"10dp"
android:layout_marginBottom=
"10dp"
android:background=
"@drawable/window2s"
...
...
@@ -15,8 +15,8 @@
<ImageView
android:id=
"@+id/card_image_toast"
android:layout_width=
"1
3
0dp"
android:layout_height=
"1
89
dp"
android:layout_width=
"1
2
0dp"
android:layout_height=
"1
74
dp"
android:layout_centerHorizontal=
"true"
android:layout_centerVertical=
"true"
android:layout_gravity=
"center"
...
...
@@ -34,8 +34,7 @@
<LinearLayout
android:id=
"@+id/layout_atk_toast"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingRight=
"10dp"
>
android:layout_height=
"wrap_content"
>
<TextView
android:layout_width=
"wrap_content"
...
...
@@ -43,9 +42,9 @@
android:maxLines=
"1"
android:singleLine=
"true"
android:text=
"ATK/"
android:textSize=
"8sp"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@android:color/holo_green_light"
/>
android:textColor=
"@android:color/holo_green_light"
android:textSize=
"8sp"
/>
<TextView
android:id=
"@+id/card_atk_toast"
...
...
@@ -63,8 +62,7 @@
<LinearLayout
android:id=
"@+id/layout_def_toast"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingLeft=
"10dp"
>
android:layout_height=
"wrap_content"
>
<TextView
android:id=
"@+id/TextDef_toast"
...
...
@@ -72,10 +70,10 @@
android:layout_height=
"match_parent"
android:maxLines=
"1"
android:singleLine=
"true"
android:textSize=
"8sp"
android:text=
"DEF/"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@android:color/holo_green_light"
/>
android:textColor=
"@android:color/holo_green_light"
android:textSize=
"8sp"
/>
<TextView
android:id=
"@+id/card_def_toast"
...
...
@@ -110,7 +108,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Title"
android:textColor=
"@color/item_title"
android:textSize=
"1
8
sp"
android:textSize=
"1
5
sp"
tools:text=
"Card Name"
/>
<LinearLayout
...
...
@@ -132,6 +130,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/star"
android:textSize=
"12sp"
tools:text=
"★4"
/>
<LinearLayout
...
...
@@ -154,6 +153,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gray"
android:textSize=
"12sp"
tools:text=
"Dark"
/>
<TextView
...
...
@@ -162,7 +162,8 @@
android:gravity=
"center"
android:text=
"/"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@android:color/holo_green_light"
/>
android:textColor=
"@android:color/holo_green_light"
android:textSize=
"12sp"
/>
<TextView
android:id=
"@+id/card_race_toast"
...
...
@@ -177,6 +178,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/gray"
android:textSize=
"12sp"
tools:text=
"SpellCaster"
/>
</LinearLayout>
</LinearLayout>
...
...
@@ -195,7 +197,7 @@
android:singleLine=
"true"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/holo_blue_bright"
android:textSize=
"1
5
sp"
android:textSize=
"1
2
sp"
tools:text=
"[A/XYZ]"
/>
</LinearLayout>
...
...
@@ -207,7 +209,7 @@
android:minHeight=
"145dp"
android:textAppearance=
"@style/TextAppearance.AppCompat.Body1"
android:textColor=
"@color/white"
android:textSize=
"1
0
sp"
android:textSize=
"1
1
sp"
tools:text=
"desc"
/>
</LinearLayout>
</LinearLayout>
\ No newline at end of file
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