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
84ed0139
Commit
84ed0139
authored
Feb 14, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善图标化按钮
parent
248ddc60
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
27 deletions
+66
-27
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
...rc/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
+9
-8
mobile/src/main/res/drawable/ic_related.xml
mobile/src/main/res/drawable/ic_related.xml
+4
-2
mobile/src/main/res/drawable/ic_to_main.xml
mobile/src/main/res/drawable/ic_to_main.xml
+8
-1
mobile/src/main/res/drawable/ic_to_side.xml
mobile/src/main/res/drawable/ic_to_side.xml
+16
-0
mobile/src/main/res/layout/dialog_cardinfo.xml
mobile/src/main/res/layout/dialog_cardinfo.xml
+29
-16
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardDetail.java
View file @
84ed0139
...
...
@@ -21,6 +21,7 @@ import android.view.Window;
import
android.view.WindowManager
;
import
android.view.animation.AnimationUtils
;
import
android.widget.Button
;
import
android.widget.ImageButton
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.ProgressBar
;
...
...
@@ -75,7 +76,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
final
CardLoader
cardLoader
;
private
final
ImageView
cardImage
;
private
final
TextView
name
;
private
final
TextView
btn_related
;
private
final
ImageButton
btn_related
;
private
final
TextView
desc
;
private
final
TextView
level
;
private
final
TextView
type
;
...
...
@@ -88,10 +89,10 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
private
final
TextView
otView
;
private
final
TextView
attrView
;
private
final
View
monsterLayout
;
private
final
View
close
;
private
final
View
faq
;
private
final
View
addMain
;
private
final
View
addSide
;
private
final
ImageButton
close
;
private
final
ImageButton
faq
;
private
final
ImageButton
addMain
;
private
final
ImageButton
addSide
;
private
final
View
linkArrow
;
private
final
View
layoutDetailPScale
;
private
final
TextView
detailCardScale
;
...
...
@@ -522,7 +523,7 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
packName
.
setText
(
packManager
.
findPackNameById
((
cardInfo
.
Alias
!=
0
&&
Math
.
abs
(
cardInfo
.
Alias
-
cardInfo
.
Code
)
<=
20
)
?
cardInfo
.
Alias
:
cardInfo
.
Code
));
name
.
setText
(
cardInfo
.
Name
);
setHighlightTextWithClickableSpans
(
cardInfo
.
Name
.
equals
(
"Unknown"
)
?
context
.
getString
(
R
.
string
.
tip_card_info_diff
)
:
cardInfo
.
Desc
);
btn_related
.
setVisibility
(
relatable
(
cardInfo
)
?
View
.
VISIBLE
:
View
.
GON
E
);
btn_related
.
setVisibility
(
relatable
(
cardInfo
)
?
View
.
VISIBLE
:
View
.
INVISIBL
E
);
cardCode
.
setText
(
String
.
format
(
"%08d"
,
cardInfo
.
getCode
()));
if
(
cardInfo
.
isType
(
CardType
.
Token
))
{
faq
.
setVisibility
(
View
.
INVISIBLE
);
...
...
@@ -533,8 +534,8 @@ public class CardDetail extends BaseAdapterPlus.BaseViewHolder {
}
if
(
mShowAdd
)
{
if
(
cardInfo
.
isType
(
CardType
.
Token
))
{
addSide
.
setVisibility
(
View
.
GON
E
);
addMain
.
setVisibility
(
View
.
GON
E
);
addSide
.
setVisibility
(
View
.
INVISIBL
E
);
addMain
.
setVisibility
(
View
.
INVISIBL
E
);
}
else
{
addSide
.
setVisibility
(
View
.
VISIBLE
);
addMain
.
setVisibility
(
View
.
VISIBLE
);
...
...
mobile/src/main/res/drawable/ic_related.xml
View file @
84ed0139
...
...
@@ -3,8 +3,10 @@
android:height=
"24dp"
android:viewportWidth=
"48.0"
android:viewportHeight=
"48.0"
>
<!-- 原有的图形 -->
<path
android:fillColor=
"@color/holo_orange_bright"
android:pathData=
"M23.54,39.8l-19-2.53,3.9-28.8,5.92.79A12.89,12.89,0,0,1,15,8l-7.73-1L3,38.44l21.75,2.89,1.6-11.79c-.46-.05-.91-.12-1.36-.21ZM13.17,14q0-.67.15-1.35l-4-.53-2.45,18,16.32,2.16L23.62,29c-.45-.13-.89-.29-1.32-.46L22,30.83,8.4,29l2.08-15.34ZM38.06,27.58l-1.19.67-1.31-2.31a13.22,13.22,0,0,0,4-17.43,13.51,13.51,0,0,0-18.3-5.09,13.25,13.25,0,0,0-5.14,18.12,13.51,13.51,0,0,0,17,5.72l1.31,2.32-1.19.66L40,42.08l4.79-2.66Zm-4.27-2.12a12.14,12.14,0,0,1-16.45-4.58A11.9,11.9,0,0,1,22,4.59,12.14,12.14,0,0,1,38.41,9.17,11.9,11.9,0,0,1,33.79,25.46ZM22.36,5.74A10.56,10.56,0,0,0,20.74,6.9l14.5,1.92L33.13,24.45l.07,0a10.93,10.93,0,0,0,1.44-1l2-14.78a12.34,12.34,0,0,0-1-1.16ZM17,15.77l11.09,1.47L27,25.76a10.59,10.59,0,0,0,1.38,0l1.31-9.7L17,14.4A10.44,10.44,0,0,0,17,15.77Z"
>
</path>
android:strokeColor=
"@color/white"
android:strokeWidth=
"0.3"
android:pathData=
"M31.59,26.2l.41,0L33.47,8.1l-7.66-.61.43,1.39L32,9.34l-1.17,14.4ZM35.12,4.69,33,30.8l.89,2.9-3.68,1.11,3.81.31L36.6,3.44l-12.34-1,.43,1.4Zm.71,25.25-.22,2.65.72.23L42,15.49,37.12,14,37,15.34l3.23,1ZM14.73,1.7l-.15,1.77,4.68-1.41ZM37.53,9l-.11,1.39,6.94,2.21-9,27.66-11.2-3.57-2.3.7,14.38,4.58,9.84-30.25ZM21.63,7.88,5.89,12.64,11.26,30,27,25.28Zm-14,5.66,13.12-4,4.57,14.81-13.12,4ZM22.81,2.41l-21,6.35L11.2,39.15l21-6.35ZM3.54,9.66,21.9,4.1l8.58,27.79L12.12,37.45Z"
/>
</vector>
\ No newline at end of file
mobile/src/main/res/drawable/ic_to_main.xml
View file @
84ed0139
...
...
@@ -4,6 +4,13 @@
android:viewportWidth=
"48.0"
android:viewportHeight=
"48.0"
>
<path
android:fillColor=
"@color/holo_orange_bright"
android:fillColor=
"@color/gold"
android:strokeColor=
"@color/gold"
android:strokeWidth=
"1"
android:pathData=
"M23.37,5.39,9.05,7V26l1.37.21v11.9l15.09,2.25,1.37.15,12.34-1.37V7.75ZM25.51,39,11.8,36.94V26.41l13.71,2.05Zm0-29.7v17.8L10.42,24.83V8.19L23.34,6.76,34,8.35ZM37.85,37.92l-11,1.22V10.51l11-1.22Z"
/>
<path
android:fillColor=
"@android:color/holo_orange_light"
android:strokeColor=
"@color/white"
android:strokeWidth=
"1"
android:pathData=
"M30,4 L34,4 L34,8 L38,8 L38,12 L34,12 L34,16 L30,16 L30,12 L26,12 L26,8 L30,8 Z"
/>
</vector>
\ No newline at end of file
mobile/src/main/res/drawable/ic_to_side.xml
0 → 100644
View file @
84ed0139
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"48.0"
android:viewportHeight=
"48.0"
>
<path
android:fillColor=
"@color/holo_green_bright"
android:strokeColor=
"@color/holo_green_bright"
android:strokeWidth=
"1"
android:pathData=
"M23.37,5.39,9.05,7V26l1.37.21v11.9l15.09,2.25,1.37.15,12.34-1.37V7.75ZM25.51,39,11.8,36.94V26.41l13.71,2.05Zm0-29.7v17.8L10.42,24.83V8.19L23.34,6.76,34,8.35ZM37.85,37.92l-11,1.22V10.51l11-1.22Z"
/>
<path
android:fillColor=
"@android:color/holo_blue_bright"
android:strokeColor=
"@color/white"
android:strokeWidth=
"1"
android:pathData=
"M30,4 L34,4 L34,8 L38,8 L38,12 L34,12 L34,16 L30,16 L30,12 L26,12 L26,8 L30,8 Z"
/>
</vector>
\ No newline at end of file
mobile/src/main/res/layout/dialog_cardinfo.xml
View file @
84ed0139
...
...
@@ -31,14 +31,13 @@
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:weightSum=
"
4.
5"
android:weightSum=
"5"
android:orientation=
"horizontal"
>
<ImageButton
android:id=
"@+id/btn_faq"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"5dp"
android:layout_weight=
"1"
android:background=
"@drawable/button2_bg"
android:tooltipText=
"@string/card_faq"
...
...
@@ -48,7 +47,7 @@
<ImageButton
android:id=
"@+id/btn_related"
android:visibility=
"visible"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:layout_marginLeft=
"5dp"
...
...
@@ -59,35 +58,50 @@
<ImageButton
android:id=
"@+id/btn_add_main"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"4dp"
android:layout_weight=
"1"
android:background=
"@drawable/button2_bg"
android:gravity=
"center"
android:tooltipText=
"@string/card_add_main"
android:src=
"@drawable/ic_to_main"
/>
android:src=
"@drawable/ic_to_main"
android:visibility=
"invisible"
tools:visibility=
"visible"
/>
<ImageButton
android:id=
"@+id/btn_add_side"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"4dp"
android:layout_weight=
"1"
android:background=
"@drawable/button2_bg"
android:gravity=
"center"
android:tooltipText=
"@string/card_add_side"
android:src=
"@drawable/ic_to_main"
/>
android:src=
"@drawable/ic_to_side"
android:visibility=
"invisible"
tools:visibility=
"visible"
/>
<ImageButton
android:id=
"@+id/btn_close"
android:layout_width=
"wrap_content"
<LinearLayout
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"0.5"
android:layout_gravity=
"right|center"
android:layout_marginLeft=
"20dp"
android:background=
"@android:color/transparent"
app:srcCompat=
"@drawable/ic_close_black_24dp"
/>
android:layout_weight=
"1"
android:orientation=
"horizontal"
>
<View
android:layout_width=
"0dp"
android:layout_height=
"1dp"
android:layout_weight=
"1"
/>
<ImageButton
android:id=
"@+id/btn_close"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"right"
android:background=
"@android:color/transparent"
android:src=
"@drawable/ic_close_black_24dp"
/>
</LinearLayout>
</LinearLayout>
<cn.garymb.ygomobile.ui.widget.AlwaysMarqueeTextView
...
...
@@ -143,7 +157,6 @@
android:layout_width=
"30dp"
android:layout_height=
"30dp"
android:layout_gravity=
"center"
android:paddingRight=
"5dp"
android:scaleType=
"fitCenter"
android:src=
"@drawable/selector_favorite"
/>
</LinearLayout>
...
...
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