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
784bea2d
Commit
784bea2d
authored
Jun 08, 2025
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"contributor"
parent
2ca6e12c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
24 deletions
+26
-24
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
...va/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
+2
-1
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareFragment.java
...a/cn/garymb/ygomobile/deck_square/DeckSquareFragment.java
+9
-8
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareListAdapter.java
...n/garymb/ygomobile/deck_square/DeckSquareListAdapter.java
+5
-5
mobile/src/main/java/cn/garymb/ygomobile/deck_square/api_response/GetSquareDeckCondition.java
...bile/deck_square/api_response/GetSquareDeckCondition.java
+7
-7
mobile/src/main/res/layout/fragment_deck_square.xml
mobile/src/main/res/layout/fragment_deck_square.xml
+3
-3
No files found.
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareApiUtil.java
View file @
784bea2d
package
cn.garymb.ygomobile.deck_square
;
import
android.util.Log
;
import
android.widget.Toast
;
import
com.google.gson.Gson
;
...
...
@@ -78,7 +79,7 @@ public class DeckSquareApiUtil {
paramMap
.
put
(
"keyWord"
,
condition
.
getKeyWord
());
paramMap
.
put
(
"sortLike"
,
condition
.
getSortLike
());
paramMap
.
put
(
"sortRank"
,
condition
.
getSortRank
());
paramMap
.
put
(
"contribut
er"
,
condition
.
getContribute
r
());
paramMap
.
put
(
"contribut
or"
,
condition
.
getContributo
r
());
Response
response
=
OkhttpUtil
.
synchronousGet
(
url
,
paramMap
,
headers
);
String
responseBodyString
=
response
.
body
().
string
();
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareFragment.java
View file @
784bea2d
...
...
@@ -3,6 +3,7 @@ package cn.garymb.ygomobile.deck_square;
import
android.os.Bundle
;
import
android.text.Editable
;
import
android.text.TextWatcher
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -28,7 +29,7 @@ public class DeckSquareFragment extends Fragment {
private
String
keyWord
;
private
Boolean
sortLike
;
private
Boolean
sortRank
;
private
String
contribut
e
r
;
private
String
contribut
o
r
;
public
DeckSquareFragment
(
YGODeckDialogUtil
.
OnDeckMenuListener
onDeckMenuListener
,
YGODeckDialogUtil
.
OnDeckDialogListener
mDialogListener
)
{
this
.
onDeckMenuListener
=
onDeckMenuListener
;
...
...
@@ -48,7 +49,7 @@ public class DeckSquareFragment extends Fragment {
//查询卡组名称
binding
.
etDeckSquareInputDeckName
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
Editable
contributerName
=
binding
.
etInputContribut
e
rName
.
getText
();
Editable
contributerName
=
binding
.
etInputContribut
o
rName
.
getText
();
if
(
contributerName
!=
null
)
contributerName
.
clear
();
keyWord
=
v
.
getText
().
toString
();
binding
.
etGoToPage
.
setText
(
"1"
);
...
...
@@ -98,30 +99,30 @@ public class DeckSquareFragment extends Fragment {
}
});
//添加贡献者查询
binding
.
etInputContribut
e
rName
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
binding
.
etInputContribut
o
rName
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
if
(
actionId
==
EditorInfo
.
IME_ACTION_SEARCH
)
{
//清除卡组名称输入的内容
Editable
deckName
=
binding
.
etDeckSquareInputDeckName
.
getText
();
if
(
deckName
!=
null
)
deckName
.
clear
();
//获取输入内容
contribut
e
r
=
v
.
getText
().
toString
();
contribut
o
r
=
v
.
getText
().
toString
();
binding
.
etGoToPage
.
setText
(
"1"
);
binding
.
etGoToPage
.
setEnabled
(
false
);
deckSquareListAdapter
.
loadData
(
1
,
1000
,
null
,
true
,
false
,
contribute
r
);
deckSquareListAdapter
.
loadData
(
1
,
1000
,
""
,
true
,
false
,
contributo
r
);
binding
.
listDeckInfo
.
scrollToPosition
(
0
);
return
true
;
}
return
false
;
});
// 添加文本变化监听器
binding
.
etInputContribut
e
rName
.
addTextChangedListener
(
new
TextWatcher
()
{
binding
.
etInputContribut
o
rName
.
addTextChangedListener
(
new
TextWatcher
()
{
@Override
public
void
beforeTextChanged
(
CharSequence
s
,
int
start
,
int
count
,
int
after
)
{}
@Override
public
void
onTextChanged
(
CharSequence
s
,
int
start
,
int
before
,
int
count
)
{
binding
.
btnClearContribut
e
rName
.
setVisibility
(
View
.
VISIBLE
);
binding
.
btnClearContribut
o
rName
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
...
...
@@ -155,7 +156,7 @@ public class DeckSquareFragment extends Fragment {
});
//设置清空按钮点击清除输入内容
binding
.
btnClearDeckName
.
setOnClickListener
(
view
->
binding
.
etDeckSquareInputDeckName
.
getText
().
clear
());
binding
.
btnClearContribut
erName
.
setOnClickListener
(
view
->
binding
.
etInputContribute
rName
.
getText
().
clear
());
binding
.
btnClearContribut
orName
.
setOnClickListener
(
view
->
binding
.
etInputContributo
rName
.
getText
().
clear
());
// 设置页码跳转监听
binding
.
etGoToPage
.
setOnEditorActionListener
((
v
,
actionId
,
event
)
->
{
if
(
actionId
==
EditorInfo
.
IME_ACTION_DONE
)
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/DeckSquareListAdapter.java
View file @
784bea2d
...
...
@@ -33,10 +33,10 @@ public class DeckSquareListAdapter extends BaseQuickAdapter<OnlineDeckDetail, Ba
loadData
(
1
,
30
,
""
,
false
,
false
,
""
);
}
public
void
loadData
(
Integer
page
,
Integer
size
,
String
keyWord
,
Boolean
sortLike
,
Boolean
sortRank
,
String
contribut
e
r
)
{
public
void
loadData
(
Integer
page
,
Integer
size
,
String
keyWord
,
Boolean
sortLike
,
Boolean
sortRank
,
String
contribut
o
r
)
{
final
DialogPlus
dialog_read_ex
=
DialogPlus
.
show
(
getContext
(),
null
,
getContext
().
getString
(
R
.
string
.
fetch_online_deck
));
VUiKit
.
defer
().
when
(()
->
{
SquareDeckResponse
result
=
DeckSquareApiUtil
.
getSquareDecks
(
new
GetSquareDeckCondition
(
page
,
size
,
keyWord
,
sortLike
,
sortRank
,
contribut
e
r
));
SquareDeckResponse
result
=
DeckSquareApiUtil
.
getSquareDecks
(
new
GetSquareDeckCondition
(
page
,
size
,
keyWord
,
sortLike
,
sortRank
,
contribut
o
r
));
if
(
result
==
null
)
{
return
null
;
}
else
{
...
...
@@ -54,11 +54,11 @@ public class DeckSquareListAdapter extends BaseQuickAdapter<OnlineDeckDetail, Ba
}
LogUtil
.
i
(
TAG
,
"Get square deck fail"
);
}).
done
((
exCardDataLis
t
)
->
{
if
(
exCardDataLis
t
!=
null
)
{
}).
done
((
resul
t
)
->
{
if
(
resul
t
!=
null
)
{
LogUtil
.
i
(
TAG
,
"Get square deck success"
);
getData
().
clear
();
addData
(
exCardDataLis
t
);
addData
(
resul
t
);
notifyDataSetChanged
();
}
if
(
dialog_read_ex
.
isShowing
())
{
...
...
mobile/src/main/java/cn/garymb/ygomobile/deck_square/api_response/GetSquareDeckCondition.java
View file @
784bea2d
...
...
@@ -6,18 +6,18 @@ public class GetSquareDeckCondition {
String
keyWord
;
Boolean
sortLike
;
Boolean
sortRank
;
String
contribut
e
r
;
String
contribut
o
r
;
public
GetSquareDeckCondition
()
{
}
public
GetSquareDeckCondition
(
Integer
page
,
Integer
size
,
String
keyWord
,
Boolean
sortLike
,
Boolean
sortRank
,
String
contribut
e
r
)
{
public
GetSquareDeckCondition
(
Integer
page
,
Integer
size
,
String
keyWord
,
Boolean
sortLike
,
Boolean
sortRank
,
String
contribut
o
r
)
{
this
.
page
=
page
;
this
.
size
=
size
;
this
.
keyWord
=
keyWord
;
this
.
sortLike
=
sortLike
;
this
.
sortRank
=
sortRank
;
this
.
contribut
er
=
contribute
r
;
this
.
contribut
or
=
contributo
r
;
}
public
Integer
getPage
()
{
...
...
@@ -60,11 +60,11 @@ public class GetSquareDeckCondition {
this
.
sortRank
=
sortRank
;
}
public
String
getContribut
e
r
()
{
return
contribut
e
r
;
public
String
getContribut
o
r
()
{
return
contribut
o
r
;
}
public
void
setContribut
er
(
String
contribute
r
)
{
this
.
contribut
er
=
contribute
r
;
public
void
setContribut
or
(
String
contributo
r
)
{
this
.
contribut
or
=
contributo
r
;
}
}
mobile/src/main/res/layout/fragment_deck_square.xml
View file @
784bea2d
...
...
@@ -63,7 +63,7 @@
android:layout_weight=
"1"
>
<EditText
android:id=
"@+id/et_input_contribut
e
r_name"
android:id=
"@+id/et_input_contribut
o
r_name"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:gravity=
"center"
...
...
@@ -74,12 +74,12 @@
android:textColor=
"@color/holo_blue_bright"
android:textColorHint=
"@color/gray"
android:textSize=
"15sp"
app:layout_constraintEnd_toStartOf=
"@id/btn_clear_contribut
e
r_name"
app:layout_constraintEnd_toStartOf=
"@id/btn_clear_contribut
o
r_name"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ImageButton
android:id=
"@+id/btn_clear_contribut
e
r_name"
android:id=
"@+id/btn_clear_contribut
o
r_name"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:layout_marginEnd=
"5dp"
...
...
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