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
c01a66c5
Commit
c01a66c5
authored
Jun 12, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加入点赞方法
parent
f006f8eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
16 deletions
+15
-16
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
...ava/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
+14
-16
mobile/src/main/res/layout/fragment_deck_cards.xml
mobile/src/main/res/layout/fragment_deck_cards.xml
+1
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerFragment.java
View file @
c01a66c5
...
@@ -33,6 +33,7 @@ import android.widget.AdapterView;
...
@@ -33,6 +33,7 @@ import android.widget.AdapterView;
import
android.widget.Button
;
import
android.widget.Button
;
import
android.widget.EditText
;
import
android.widget.EditText
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
import
android.widget.LinearLayout
;
import
android.widget.Spinner
;
import
android.widget.Spinner
;
import
android.widget.TextView
;
import
android.widget.TextView
;
...
@@ -130,6 +131,8 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
...
@@ -130,6 +131,8 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
protected
CardListAdapter
mCardListAdapter
;
protected
CardListAdapter
mCardListAdapter
;
protected
boolean
isLoad
=
false
;
protected
boolean
isLoad
=
false
;
private
HomeActivity
activity
;
private
HomeActivity
activity
;
private
String
mDeckId
;
private
LinearLayout
ll_click_like
;
protected
int
screenWidth
;
protected
int
screenWidth
;
...
@@ -207,14 +210,14 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
...
@@ -207,14 +210,14 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
initBoomMenuButton
(
layoutView
.
findViewById
(
R
.
id
.
bmb
));
initBoomMenuButton
(
layoutView
.
findViewById
(
R
.
id
.
bmb
));
layoutView
.
findViewById
(
R
.
id
.
btn_nav_search
).
setOnClickListener
((
v
)
->
doMenu
(
R
.
id
.
action_search
));
layoutView
.
findViewById
(
R
.
id
.
btn_nav_search
).
setOnClickListener
((
v
)
->
doMenu
(
R
.
id
.
action_search
));
layoutView
.
findViewById
(
R
.
id
.
btn_nav_list
).
setOnClickListener
((
v
)
->
doMenu
(
R
.
id
.
action_card_list
));
layoutView
.
findViewById
(
R
.
id
.
btn_nav_list
).
setOnClickListener
((
v
)
->
doMenu
(
R
.
id
.
action_card_list
));
tv_deck
.
setOnClickListener
(
v
->
ll_click_like
=
layoutView
.
findViewById
(
R
.
id
.
ll_click_like
);
{
ll_click_like
.
setOnClickListener
(
v
->
{
new
DeckManageDialog
(
this
).
show
(
ll_click_like
.
setVisibility
(
View
.
GONE
);
getActivity
().
getSupportFragmentManager
(),
});
"pagerDialog"
tv_deck
.
setOnClickListener
(
v
->
{
);
new
DeckManageDialog
(
this
).
show
(
}
getActivity
().
getSupportFragmentManager
(),
"pagerDialog"
);
);
}
);
// YGODeckDialogUtil.dialogDeckSelect(getActivity(), AppsSettings.get().getLastDeckPath(), this));
// YGODeckDialogUtil.dialogDeckSelect(getActivity(), AppsSettings.get().getLastDeckPath(), this));
mContext
=
(
BaseActivity
)
getActivity
();
mContext
=
(
BaseActivity
)
getActivity
();
}
}
...
@@ -1259,31 +1262,26 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
...
@@ -1259,31 +1262,26 @@ public class DeckManagerFragment extends BaseFragemnt implements RecyclerViewIte
@Override
@Override
public
void
onDeckSelect
(
DeckFile
deckFile
)
{
public
void
onDeckSelect
(
DeckFile
deckFile
)
{
if
(!
deckFile
.
isLocal
())
{
//不在本地,在云上(卡组广场中或用户的云上)
if
(!
deckFile
.
isLocal
())
{
//不在本地,在云上(卡组广场中或用户的云上)
VUiKit
.
defer
().
when
(()
->
{
VUiKit
.
defer
().
when
(()
->
{
DownloadDeckResponse
response
=
DeckSquareApiUtil
.
getDeckById
(
deckFile
.
getDeckId
());
DownloadDeckResponse
response
=
DeckSquareApiUtil
.
getDeckById
(
deckFile
.
getDeckId
());
if
(
response
!=
null
)
{
if
(
response
!=
null
)
{
return
response
.
getData
();
return
response
.
getData
();
}
else
{
}
else
{
return
null
;
return
null
;
}
}
}).
fail
((
e
)
->
{
}).
fail
((
e
)
->
{
LogUtil
.
i
(
TAG
,
"square deck detail fail"
+
e
.
getMessage
());
LogUtil
.
i
(
TAG
,
"square deck detail fail"
+
e
.
getMessage
());
}).
done
((
deckData
)
->
{
}).
done
((
deckData
)
->
{
if
(
deckData
!=
null
)
{
if
(
deckData
!=
null
)
{
mDeckId
=
deckData
.
getDeckId
();
Log
.
w
(
"seesee mDeckId"
,
mDeckId
);
if
(
mDeckId
!=
null
)
ll_click_like
.
setVisibility
(
View
.
VISIBLE
);
deckData
.
getDeckYdk
();
deckData
.
getDeckYdk
();
String
fileFullName
=
deckData
.
getDeckName
()
+
".ydk"
;
String
fileFullName
=
deckData
.
getDeckName
()
+
".ydk"
;
// String path = AppsSettings.get().getDeckDir();
// String path = AppsSettings.get().getDeckDir();
File
dir
=
new
File
(
getActivity
().
getApplicationInfo
().
dataDir
,
"cache"
);
File
dir
=
new
File
(
getActivity
().
getApplicationInfo
().
dataDir
,
"cache"
);
//将卡组存到cache缓存目录中
//将卡组存到cache缓存目录中
boolean
result
=
DeckSquareFileUtil
.
saveFileToPath
(
dir
.
getPath
(),
fileFullName
,
deckData
.
getDeckYdk
());
boolean
result
=
DeckSquareFileUtil
.
saveFileToPath
(
dir
.
getPath
(),
fileFullName
,
deckData
.
getDeckYdk
());
if
(
result
)
{
//存储成功,使用预加载功能
if
(
result
)
{
//存储成功,使用预加载功能
LogUtil
.
i
(
TAG
,
"square deck detail done"
);
LogUtil
.
i
(
TAG
,
"square deck detail done"
);
//File file = new File(dir, fileFullName);
//File file = new File(dir, fileFullName);
...
...
mobile/src/main/res/layout/fragment_deck_cards.xml
View file @
c01a66c5
...
@@ -60,6 +60,7 @@
...
@@ -60,6 +60,7 @@
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/button_radius_red"
android:background=
"@drawable/button_radius_red"
android:visibility=
"gone"
android:orientation=
"horizontal"
>
android:orientation=
"horizontal"
>
<ImageView
<ImageView
...
...
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