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
bfae57c0
Commit
bfae57c0
authored
Dec 25, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配置模式开关滑块颜色以和禁限图标风格一致
parent
eb3bf308
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
3 deletions
+26
-3
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
.../main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
+1
-0
mobile/src/main/res/color/switch_thumb_color_selector.xml
mobile/src/main/res/color/switch_thumb_color_selector.xml
+7
-0
mobile/src/main/res/color/switch_track_color_selector.xml
mobile/src/main/res/color/switch_track_color_selector.xml
+7
-0
mobile/src/main/res/layout/nav_card_search.xml
mobile/src/main/res/layout/nav_card_search.xml
+3
-0
mobile/src/main/res/values/styles.xml
mobile/src/main/res/values/styles.xml
+7
-2
No files found.
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
bfae57c0
...
...
@@ -8,9 +8,9 @@ import cn.garymb.ygomobile.lite.BuildConfig;
public
interface
Constants
{
boolean
DEBUG
=
BuildConfig
.
DEBUG
;
String
PREF_START
=
"game_pref_"
;
String
PREF_LAST_LIMIT
=
"pref_last_limit"
;
String
PREF_LAST_GENESYS_MODE
=
"pref_last_genesys_mode"
;
int
PREF_DEF_LAST_GENESYS_MODE
=
0
;
//0代表传统禁限模式,1代表Genesys模式
String
PREF_LAST_LIMIT
=
"pref_last_limit"
;
String
PREF_DEF_LAST_LIMIT
=
""
;
String
PREF_LAST_GENESYS_LIMIT
=
"pref_last_genesys_limit"
;
String
PREF_DEF_LAST_GENESYS_LIMIT
=
""
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/CardSearcher.java
View file @
bfae57c0
...
...
@@ -211,6 +211,7 @@ public class CardSearcher implements View.OnClickListener {
}
});
genesys_Switch
.
setChecked
(
mSettings
.
getGenesysMode
()
!=
0
);
genesys_Switch
.
setText
(
mSettings
.
getGenesysMode
()
!=
0
?
R
.
string
.
switch_genesys_mode
:
R
.
string
.
switch_banlist_mode
);
genesys_Switch
.
setOnCheckedChangeListener
((
buttonView
,
isChecked
)
->
{
//根据开关切换两种模式禁卡表的显示和隐藏
genesys_limitListSpinner
.
setVisibility
(
isChecked
?
View
.
VISIBLE
:
View
.
GONE
);
...
...
mobile/src/main/res/color/switch_thumb_color_selector.xml
0 → 100644
View file @
bfae57c0
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- 开启状态:红色 -->
<item
android:color=
"@android:color/holo_red_dark"
android:state_checked=
"true"
/>
<!-- 关闭状态:蓝色 -->
<item
android:color=
"@android:color/holo_blue_dark"
android:state_checked=
"false"
/>
</selector>
\ No newline at end of file
mobile/src/main/res/color/switch_track_color_selector.xml
0 → 100644
View file @
bfae57c0
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!-- 开启状态:浅红色 -->
<item
android:color=
"@android:color/darker_gray"
android:state_checked=
"true"
/>
<!-- 关闭状态:浅蓝色 -->
<item
android:color=
"@android:color/holo_orange_light"
android:state_checked=
"false"
/>
</selector>
\ No newline at end of file
mobile/src/main/res/layout/nav_card_search.xml
View file @
bfae57c0
...
...
@@ -38,6 +38,9 @@
<Switch
android:id=
"@+id/sw_genesys_mode"
style=
"@style/CustomSwitch"
android:thumbTint=
"@color/switch_thumb_color_selector"
android:trackTint=
"@color/switch_track_color_selector"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
...
...
mobile/src/main/res/values/styles.xml
View file @
bfae57c0
...
...
@@ -114,12 +114,17 @@
<item
name=
"android:backgroundDimEnabled"
>
true
</item>
</style>
<style
name=
"itemSpinnerStyle"
parent=
"Widget.AppCompat.DropDownItem.Spinner"
>
<style
name=
"itemSpinnerStyle"
parent=
"Widget.AppCompat.DropDownItem.Spinner"
>
</style>
<style
name=
"wallet_third_tab_layout"
>
<item
name=
"android:textSize"
>
8sp
</item>
<item
name=
"android:textStyle"
>
bold
</item>
<item
name=
"android:textColor"
>
@color/selector_text_color_white_gold
</item>
</style>
<style
name=
"CustomSwitch"
parent=
"Widget.AppCompat.CompoundButton.Switch"
>
<item
name=
"android:thumbTint"
>
@color/switch_thumb_color_selector
</item>
<item
name=
"android:trackTint"
>
@color/switch_track_color_selector
</item>
</style>
</resources>
\ 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