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
2219108c
Commit
2219108c
authored
Jul 22, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
从jni获取最后分类
parent
5908e795
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+40
-2
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+2
-0
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
...cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
+1
-0
No files found.
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
2219108c
...
...
@@ -483,14 +483,14 @@ public class AppsSettings {
}
/***
* 最后卡组名
*
获得
最后卡组名
*/
public
String
getLastDeck
()
{
return
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_YDK
,
Constants
.
PREF_DEF_LAST_YDK
);
}
/***
* 最后卡组名
*
保存
最后卡组名
*/
public
void
setLastDeck
(
String
name
)
{
if
(
TextUtils
.
equals
(
name
,
getCurLastDeck
()))
{
...
...
@@ -504,6 +504,28 @@ public class AppsSettings {
return
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_YDK
,
null
);
}
/***
* 获得最后卡组分类名
*/
public
String
getLastCategory
()
{
return
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_CATEGORY
,
Constants
.
PREF_DEF_LAST_CATEGORY
);
}
/***
* 保存最后卡组分类名
*/
public
void
setLastCategory
(
String
name
)
{
if
(
TextUtils
.
equals
(
name
,
getCurLastCategory
()))
{
//一样
return
;
}
mSharedPreferences
.
putString
(
Constants
.
PREF_LAST_CATEGORY
,
name
);
}
public
String
getCurLastCategory
()
{
return
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_CATEGORY
,
null
);
}
public
void
saveIntSettings
(
String
key
,
int
value
)
{
mSharedPreferences
.
putInt
(
Constants
.
PREF_START
+
key
,
value
);
}
...
...
@@ -584,6 +606,22 @@ public class AppsSettings {
return
mSharedPreferences
.
getString
(
Constants
.
PREF_START
+
key
,
null
);
}
public
void
saveCategorySettings
(
String
key
,
String
value
)
{
if
(
"lastcategory"
.
equals
(
key
))
{
setLastCategory
(
value
);
}
else
{
mSharedPreferences
.
putString
(
Constants
.
PREF_START
+
key
,
value
);
}
}
public
String
getCategorySettings
(
String
key
)
{
if
(
"lastcategory"
.
equals
(
key
))
{
String
val
=
getLastCategory
();
return
val
;
}
return
mSharedPreferences
.
getString
(
Constants
.
PREF_START
+
key
,
null
);
}
public
List
<
String
>
getLastRoomList
()
{
List
<
String
>
names
=
new
ArrayList
<>();
String
json
=
mSharedPreferences
.
getString
(
Constants
.
PREF_LAST_ROOM_LIST
,
null
);
...
...
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
2219108c
...
...
@@ -9,6 +9,8 @@ public interface Constants {
String
PREF_START
=
"game_pref_"
;
String
PREF_LAST_YDK
=
"pref_last_ydk"
;
String
PREF_DEF_LAST_YDK
=
"new"
;
String
PREF_LAST_CATEGORY
=
"pre_last_category"
;
String
PREF_DEF_LAST_CATEGORY
=
"newcate"
;
String
PREF_GAME_PATH
=
"pref_key_game_res_path"
;
String
PREF_DEF_GAME_DIR
=
"ygocore"
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/cards/DeckManagerActivityImpl.java
View file @
2219108c
...
...
@@ -241,6 +241,7 @@ class DeckManagerActivityImpl extends BaseCardsAcitivity implements RecyclerView
if
(
file
==
null
)
{
return
new
DeckInfo
();
}
Log
.
i
(
"最后分类"
,
mSettings
.
getLastCategory
());
Log
.
i
(
"kk"
,
"load ydk "
+
file
);
if
(
mCardLoader
.
isOpen
()
&&
file
.
exists
())
{
return
mDeckAdapater
.
read
(
mCardLoader
,
file
,
mCardLoader
.
getLimitList
());
...
...
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