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
811d6f1a
Commit
811d6f1a
authored
Apr 05, 2020
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变更workdir
parent
c020ed46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
+8
-11
No files found.
mobile/src/main/java/cn/garymb/ygomobile/AppsSettings.java
View file @
811d6f1a
...
...
@@ -135,7 +135,7 @@ public class AppsSettings {
}
public
float
getXScale
(
int
w
,
int
h
)
{
if
(
isKeepScale
())
{
if
(
isKeepScale
())
{
float
sx
=
getScreenHeight
()
/
w
;
float
sy
=
getScreenWidth
()
/
h
;
return
Math
.
min
(
sx
,
sy
);
...
...
@@ -144,7 +144,7 @@ public class AppsSettings {
}
public
float
getYScale
(
int
w
,
int
h
)
{
if
(
isKeepScale
())
{
if
(
isKeepScale
())
{
//固定比例,取最小值
float
sx
=
getScreenHeight
()
/
w
;
float
sy
=
getScreenWidth
()
/
h
;
...
...
@@ -153,7 +153,7 @@ public class AppsSettings {
return
getScreenWidth
()
/
h
;
}
public
boolean
isKeepScale
(){
public
boolean
isKeepScale
()
{
return
mSharedPreferences
.
getBoolean
(
PREF_KEEP_SCALE
,
DEF_PREF_KEEP_SCALE
);
}
...
...
@@ -179,7 +179,7 @@ public class AppsSettings {
h
=
mScreenSize
.
y
;
}
int
ret
=
Math
.
max
(
w
,
h
);
if
(
isImmerSiveMode
())
{
if
(
isImmerSiveMode
())
{
//刘海高度
ret
-=
getNotchHeight
();
}
...
...
@@ -339,11 +339,12 @@ public class AppsSettings {
/**
* 根据卡密获取卡图的路径
*
* @param code 卡密
* @return
*/
public
String
getCardImagePath
(
int
code
){
return
new
File
(
getCardImagePath
(),
code
+
".jpg"
).
getAbsolutePath
();
public
String
getCardImagePath
(
int
code
)
{
return
new
File
(
getCardImagePath
(),
code
+
".jpg"
).
getAbsolutePath
();
}
/***
...
...
@@ -451,11 +452,7 @@ public class AppsSettings {
*/
public
String
getResourcePath
()
{
String
defPath
;
try
{
defPath
=
new
File
(
Environment
.
getExternalStorageDirectory
(),
Constants
.
PREF_DEF_GAME_DIR
).
getAbsolutePath
();
}
catch
(
Exception
e
)
{
defPath
=
new
File
(
context
.
getFilesDir
(),
Constants
.
PREF_DEF_GAME_DIR
).
getAbsolutePath
();
}
defPath
=
new
File
(
String
.
valueOf
(
context
.
getExternalFilesDir
(
Constants
.
PREF_DEF_GAME_DIR
))).
getAbsolutePath
();
return
mSharedPreferences
.
getString
(
Constants
.
PREF_GAME_PATH
,
defPath
);
}
...
...
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