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
aa3a4a43
Commit
aa3a4a43
authored
Jan 30, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将卡组分类dialog统一为dialogplus
修正无法上下滑动列表的问题
parent
41acadf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
32 deletions
+19
-32
mobile/src/main/java/cn/garymb/ygomobile/utils/YGODialogUtil.java
...rc/main/java/cn/garymb/ygomobile/utils/YGODialogUtil.java
+19
-20
mobile/src/main/res/layout/dialog_deck_select.xml
mobile/src/main/res/layout/dialog_deck_select.xml
+0
-12
No files found.
mobile/src/main/java/cn/garymb/ygomobile/utils/YGODialogUtil.java
View file @
aa3a4a43
...
...
@@ -93,25 +93,26 @@ public class YGODialogUtil {
private
final
TextView
tv_del
;
private
final
TextSelectAdapter
<
DeckType
>
typeAdp
;
private
final
DeckListAdapter
<
DeckFile
>
deckAdp
;
private
final
Dialog
ygoDialog
;
private
final
Dialog
Plus
ygoDialog
;
public
ViewHolder
(
Context
context
,
String
selectDeckPath
,
OnDeckMenuListener
onDeckMenuListener
)
{
DialogUtils
du
=
DialogUtils
.
getdx
(
context
);
View
viewDialog
=
du
.
dialogBottomSheet
(
R
.
layout
.
dialog_deck_select
,
true
);
ygoDialog
=
new
DialogPlus
(
context
);
ygoDialog
.
setContentView
(
R
.
layout
.
dialog_deck_select
);
ygoDialog
.
setTitle
(
R
.
string
.
category_manager
);
RecyclerView
rv_type
,
rv_deck
;
rv_deck
=
view
Dialog
.
findViewById
(
R
.
id
.
rv_deck
);
rv_type
=
view
Dialog
.
findViewById
(
R
.
id
.
rv_type
);
ll_move
=
view
Dialog
.
findViewById
(
R
.
id
.
ll_move
);
ll_copy
=
view
Dialog
.
findViewById
(
R
.
id
.
ll_copy
);
ll_del
=
view
Dialog
.
findViewById
(
R
.
id
.
ll_del
);
LinearLayout
ll_add
=
view
Dialog
.
findViewById
(
R
.
id
.
ll_add
);
iv_copy
=
view
Dialog
.
findViewById
(
R
.
id
.
iv_copy
);
iv_move
=
view
Dialog
.
findViewById
(
R
.
id
.
iv_move
);
iv_del
=
view
Dialog
.
findViewById
(
R
.
id
.
iv_del
);
tv_move
=
view
Dialog
.
findViewById
(
R
.
id
.
tv_move
);
tv_copy
=
view
Dialog
.
findViewById
(
R
.
id
.
tv_copy
);
tv_del
=
view
Dialog
.
findViewById
(
R
.
id
.
tv_del
);
rv_deck
=
ygo
Dialog
.
findViewById
(
R
.
id
.
rv_deck
);
rv_type
=
ygo
Dialog
.
findViewById
(
R
.
id
.
rv_type
);
ll_move
=
ygo
Dialog
.
findViewById
(
R
.
id
.
ll_move
);
ll_copy
=
ygo
Dialog
.
findViewById
(
R
.
id
.
ll_copy
);
ll_del
=
ygo
Dialog
.
findViewById
(
R
.
id
.
ll_del
);
LinearLayout
ll_add
=
ygo
Dialog
.
findViewById
(
R
.
id
.
ll_add
);
iv_copy
=
ygo
Dialog
.
findViewById
(
R
.
id
.
iv_copy
);
iv_move
=
ygo
Dialog
.
findViewById
(
R
.
id
.
iv_move
);
iv_del
=
ygo
Dialog
.
findViewById
(
R
.
id
.
iv_del
);
tv_move
=
ygo
Dialog
.
findViewById
(
R
.
id
.
tv_move
);
tv_copy
=
ygo
Dialog
.
findViewById
(
R
.
id
.
tv_copy
);
tv_del
=
ygo
Dialog
.
findViewById
(
R
.
id
.
tv_del
);
hideAllDeckUtil
();
rv_deck
.
setLayoutManager
(
new
FastScrollLinearLayoutManager
(
context
));
...
...
@@ -215,7 +216,7 @@ public class YGODialogUtil {
dialogl
(
context
,
context
.
getString
(
R
.
string
.
new_deck
),
new
String
[]{
context
.
getString
(
R
.
string
.
category_name
),
context
.
getString
(
R
.
string
.
deck_name
)}).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
du
.
di
s
();
ygoDialog
.
dismis
s
();
switch
(
position
)
{
case
0
:
//if (deckList.size()>=8){
...
...
@@ -261,7 +262,7 @@ public class YGODialogUtil {
dialogl
(
context
,
context
.
getString
(
please_select_target_category
),
getStringType
(
otherType
)).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
du
.
di
s
();
ygoDialog
.
dismis
s
();
DeckType
toType
=
otherType
.
get
(
position
);
IOUtils
.
createFolder
(
new
File
(
toType
.
getPath
()));
List
<
DeckFile
>
deckFileList
=
deckAdp
.
getSelectList
();
...
...
@@ -284,7 +285,7 @@ public class YGODialogUtil {
dialogl
(
context
,
context
.
getString
(
please_select_target_category
),
getStringType
(
otherType
)).
setOnItemClickListener
((
parent
,
view
,
position
,
id
)
->
{
du
.
di
s
();
ygoDialog
.
dismis
s
();
DeckType
toType
=
otherType
.
get
(
position
);
IOUtils
.
createFolder
(
new
File
(
toType
.
getPath
()));
List
<
DeckFile
>
deckFileList
=
deckAdp
.
getSelectList
();
...
...
@@ -335,8 +336,6 @@ public class YGODialogUtil {
dialogPlus
.
show
();
}
});
ygoDialog
=
du
.
getDialog
();
ygoDialog
.
setOnDismissListener
(
new
DialogInterface
.
OnDismissListener
()
{
@Override
public
void
onDismiss
(
DialogInterface
dialog
)
{
...
...
mobile/src/main/res/layout/dialog_deck_select.xml
View file @
aa3a4a43
...
...
@@ -3,20 +3,8 @@
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/blue"
android:orientation=
"vertical"
>
<androidx.appcompat.widget.AppCompatTextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal"
android:gravity=
"center"
android:padding=
"10dp"
android:text=
"@string/category_manager"
android:textColor=
"@color/holo_blue_bright"
android:textSize=
"15sp"
android:textStyle=
"bold"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
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