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
e3069d02
Commit
e3069d02
authored
Jul 06, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复横划删除分类
parent
ffba558f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
20 deletions
+32
-20
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck_square/DeckSelectFragment.java
...mb/ygomobile/ui/cards/deck_square/DeckSelectFragment.java
+31
-19
mobile/src/main/res/layout/dialog_deck_manager.xml
mobile/src/main/res/layout/dialog_deck_manager.xml
+1
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/deck_square/DeckSelectFragment.java
View file @
e3069d02
package
cn.garymb.ygomobile.ui.cards.deck_square
;
package
cn.garymb.ygomobile.ui.cards.deck_square
;
import
static
cn
.
garymb
.
ygomobile
.
Constants
.
YDK_FILE_EX
;
import
android.content.Context
;
import
android.content.Context
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
import
android.os.Build
;
import
android.os.Build
;
...
@@ -9,6 +11,7 @@ import android.text.InputType;
...
@@ -9,6 +11,7 @@ import android.text.InputType;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.text.TextWatcher
;
import
android.text.TextWatcher
;
import
android.view.Gravity
;
import
android.view.Gravity
;
import
android.view.KeyEvent
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -21,6 +24,7 @@ import androidx.annotation.NonNull;
...
@@ -21,6 +24,7 @@ import androidx.annotation.NonNull;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
androidx.fragment.app.Fragment
;
import
androidx.fragment.app.Fragment
;
import
androidx.recyclerview.widget.FastScrollLinearLayoutManager
;
import
androidx.recyclerview.widget.FastScrollLinearLayoutManager
;
import
androidx.recyclerview.widget.ItemTouchHelper
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.BaseQuickAdapter
;
import
com.chad.library.adapter.base.listener.OnItemLongClickListener
;
import
com.chad.library.adapter.base.listener.OnItemLongClickListener
;
...
@@ -52,6 +56,7 @@ import cn.garymb.ygomobile.utils.LogUtil;
...
@@ -52,6 +56,7 @@ import cn.garymb.ygomobile.utils.LogUtil;
import
cn.garymb.ygomobile.utils.SharedPreferenceUtil
;
import
cn.garymb.ygomobile.utils.SharedPreferenceUtil
;
import
cn.garymb.ygomobile.utils.YGODeckDialogUtil
;
import
cn.garymb.ygomobile.utils.YGODeckDialogUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.utils.YGOUtil
;
import
cn.garymb.ygomobile.utils.recyclerview.DeckTypeTouchHelperCallback
;
//在dialog中卡组选择的Fragment,选中页面中某项后,在卡组编辑页面中显示卡片
//在dialog中卡组选择的Fragment,选中页面中某项后,在卡组编辑页面中显示卡片
public
class
DeckSelectFragment
extends
Fragment
{
public
class
DeckSelectFragment
extends
Fragment
{
...
@@ -416,25 +421,32 @@ public class DeckSelectFragment extends Fragment {
...
@@ -416,25 +421,32 @@ public class DeckSelectFragment extends Fragment {
}
}
});
});
//todo
//todo
// ygoDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
ItemTouchHelper
itemTouchHelper
=
new
ItemTouchHelper
(
new
DeckTypeTouchHelperCallback
(
new
YGODeckDialogUtil
.
OnDeckTypeListener
()
{
// @Override
@Override
// public void onDismiss(DialogInterface dialog) {
public
void
onDeckTypeListener
(
int
positon
)
{
// clearDeckSelect();
File
file
=
new
File
(
typeList
.
get
(
positon
).
getPath
());
// }
File
[]
files
=
file
.
listFiles
();
// });
List
<
DeckFile
>
deckFileList
=
new
ArrayList
<>();
// ygoDialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
if
(
files
!=
null
)
{
// @Override
for
(
File
file1
:
files
)
{
// public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
deckFileList
.
add
(
new
DeckFile
(
file1
));
// if (keyCode == KeyEvent.KEYCODE_BACK) {
}
// if (deckAdp.isManySelect()) {
}
// clearDeckSelect();
IOUtils
.
delete
(
file
);
// return true;
YGOUtil
.
showTextToast
(
R
.
string
.
done
);
// }
onDeckMenuListener
.
onDeckDel
(
deckFileList
);
//
typeAdp
.
remove
(
positon
);
// }
if
(
typeAdp
.
getSelectPosition
()
==
positon
)
{
// return false;
typeAdp
.
setSelectPosition
(
2
);
// }
typeAdp
.
notifyItemChanged
(
2
);
// });
}
clearDeckSelect
();
deckList
.
clear
();
deckList
.
addAll
(
DeckUtil
.
getDeckList
(
typeList
.
get
(
2
).
getPath
()));
deckAdp
.
notifyDataSetChanged
();
}
}));
itemTouchHelper
.
attachToRecyclerView
(
binding
.
rvType
);
}
}
return
binding
.
getRoot
();
return
binding
.
getRoot
();
}
}
...
...
mobile/src/main/res/layout/dialog_deck_manager.xml
View file @
e3069d02
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
android:id=
"@+id/appbar"
android:id=
"@+id/appbar"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/
veil2
"
android:background=
"@drawable/
button_radius_black_transparents
"
android:paddingBottom=
"5dp"
>
android:paddingBottom=
"5dp"
>
<com.google.android.material.tabs.TabLayout
<com.google.android.material.tabs.TabLayout
...
...
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