Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile-Cn-Ko-En
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-Cn-Ko-En
Commits
763bd9b5
Commit
763bd9b5
authored
Mar 15, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
卡包展示按时间顺序排列
parent
adca5ad1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
3 deletions
+19
-3
mobile/src/main/java/cn/garymb/ygomobile/bean/events/DeckFile.java
...c/main/java/cn/garymb/ygomobile/bean/events/DeckFile.java
+4
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/widget/SearchableListDialog.java
...a/cn/garymb/ygomobile/ui/widget/SearchableListDialog.java
+3
-2
mobile/src/main/java/cn/garymb/ygomobile/utils/DeckUtil.java
mobile/src/main/java/cn/garymb/ygomobile/utils/DeckUtil.java
+12
-1
No files found.
mobile/src/main/java/cn/garymb/ygomobile/bean/events/DeckFile.java
View file @
763bd9b5
...
@@ -8,6 +8,7 @@ public class DeckFile extends TextSelect {
...
@@ -8,6 +8,7 @@ public class DeckFile extends TextSelect {
private
String
name
;
private
String
name
;
private
String
path
;
private
String
path
;
private
Long
date
;
public
DeckFile
(
String
path
)
{
public
DeckFile
(
String
path
)
{
this
.
path
=
path
;
this
.
path
=
path
;
...
@@ -23,6 +24,7 @@ public class DeckFile extends TextSelect {
...
@@ -23,6 +24,7 @@ public class DeckFile extends TextSelect {
path
=
file
.
getAbsolutePath
();
path
=
file
.
getAbsolutePath
();
name
=
file
.
getName
();
name
=
file
.
getName
();
name
=
name
.
substring
(
0
,
name
.
lastIndexOf
(
"."
));
name
=
name
.
substring
(
0
,
name
.
lastIndexOf
(
"."
));
date
=
file
.
lastModified
();
super
.
setName
(
name
);
super
.
setName
(
name
);
setObject
(
this
);
setObject
(
this
);
}
}
...
@@ -43,4 +45,6 @@ public class DeckFile extends TextSelect {
...
@@ -43,4 +45,6 @@ public class DeckFile extends TextSelect {
this
.
path
=
path
;
this
.
path
=
path
;
}
}
public
Long
getDate
()
{
return
date
;
}
}
}
mobile/src/main/java/cn/garymb/ygomobile/ui/widget/SearchableListDialog.java
View file @
763bd9b5
...
@@ -113,6 +113,7 @@ public class SearchableListDialog extends DialogFragment implements
...
@@ -113,6 +113,7 @@ public class SearchableListDialog extends DialogFragment implements
outState
.
putSerializable
(
"item"
,
_searchableItem
);
outState
.
putSerializable
(
"item"
,
_searchableItem
);
super
.
onSaveInstanceState
(
outState
);
super
.
onSaveInstanceState
(
outState
);
}
}
// Change End
// Change End
public
void
setTitle
(
String
strTitle
)
{
public
void
setTitle
(
String
strTitle
)
{
_strTitle
=
strTitle
;
_strTitle
=
strTitle
;
...
@@ -146,8 +147,8 @@ public class SearchableListDialog extends DialogFragment implements
...
@@ -146,8 +147,8 @@ public class SearchableListDialog extends DialogFragment implements
_searchView
.
setOnQueryTextListener
(
this
);
_searchView
.
setOnQueryTextListener
(
this
);
_searchView
.
setOnCloseListener
(
this
);
_searchView
.
setOnCloseListener
(
this
);
_searchView
.
clearFocus
();
_searchView
.
clearFocus
();
int
id
=
_searchView
.
getContext
().
getResources
().
getIdentifier
(
"android:id/search_src_text"
,
null
,
null
);
int
id
=
_searchView
.
getContext
().
getResources
().
getIdentifier
(
"android:id/search_src_text"
,
null
,
null
);
TextView
textView1
=
(
TextView
)
_searchView
.
findViewById
(
id
);
TextView
textView1
=
(
TextView
)
_searchView
.
findViewById
(
id
);
textView1
.
setTextColor
(
Color
.
parseColor
(
"#ff8800"
));
textView1
.
setTextColor
(
Color
.
parseColor
(
"#ff8800"
));
InputMethodManager
mgr
=
(
InputMethodManager
)
getActivity
().
getSystemService
(
Context
InputMethodManager
mgr
=
(
InputMethodManager
)
getActivity
().
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
.
INPUT_METHOD_SERVICE
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/utils/DeckUtil.java
View file @
763bd9b5
...
@@ -49,7 +49,11 @@ public class DeckUtil {
...
@@ -49,7 +49,11 @@ public class DeckUtil {
}
}
}
}
}
}
Collections
.
sort
(
deckList
,
nameCom
);
if
(
path
.
equals
(
AppsSettings
.
get
().
getPackDeckDir
()))
{
Collections
.
sort
(
deckList
,
dateCom
);
}
else
{
Collections
.
sort
(
deckList
,
nameCom
);
}
return
deckList
;
return
deckList
;
}
}
...
@@ -122,4 +126,11 @@ public class DeckUtil {
...
@@ -122,4 +126,11 @@ public class DeckUtil {
}
}
};
};
static
Comparator
dateCom
=
new
Comparator
<
DeckFile
>()
{
@Override
public
int
compare
(
DeckFile
ydk1
,
DeckFile
ydk2
)
{
return
ydk2
.
getDate
().
compareTo
(
ydk1
.
getDate
());
}
};
}
}
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