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
aafcd6a6
Commit
aafcd6a6
authored
Oct 15, 2019
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove Window().setLayout(w,h)
parent
7a1a55c5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
20 deletions
+3
-20
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
.../src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
+2
-19
mobile/build.gradle
mobile/build.gradle
+1
-1
No files found.
libcore/src/main/java/cn/garymb/ygomobile/YGOMobileActivity.java
View file @
aafcd6a6
...
...
@@ -101,7 +101,6 @@ public class YGOMobileActivity extends NativeActivity implements
private
SurfaceView
mSurfaceView
;
private
boolean
replaced
=
false
;
private
static
boolean
USE_SURFACE
=
true
;
private
static
boolean
RESIZE_WINDOW
=
true
;
// public static int notchHeight;
...
...
@@ -251,11 +250,6 @@ public class YGOMobileActivity extends NativeActivity implements
changeGameSize
();
}
else
{
int
[]
size
=
getGameSize
();
if
(
RESIZE_WINDOW
)
{
if
(
app
().
isKeepScale
())
{
getWindow
().
setLayout
(
size
[
0
],
size
[
1
]);
}
}
}
}
...
...
@@ -305,11 +299,9 @@ public class YGOMobileActivity extends NativeActivity implements
changeGameSize
();
}
else
{
mLayout
.
addView
(
view
,
lp
);
if
(
RESIZE_WINDOW
)
{
getWindow
().
setLayout
(
w
,
h
);
getWindow
().
setGravity
(
Gravity
.
CENTER
);
}
super
.
setContentView
(
mLayout
);
getWindow
().
setGravity
(
Gravity
.
CENTER
);
}
}
...
...
@@ -333,15 +325,6 @@ public class YGOMobileActivity extends NativeActivity implements
// Log.i("ygo", "Android command setInputFix2:posX=" + spX + ",posY=" + spY);
IrrlichtBridge
.
setInputFix
(
mPositionX
,
mPositionY
);
}
if
(
RESIZE_WINDOW
)
{
if
(
app
().
isKeepScale
())
{
//设置为屏幕宽高
getWindow
().
setLayout
(
w
,
h
);
}
else
{
//拉伸,画布设置为游戏宽高
getWindow
().
setLayout
(
size
[
0
],
size
[
1
]);
}
}
}
private
void
initExtraView
()
{
...
...
mobile/build.gradle
View file @
aafcd6a6
...
...
@@ -8,7 +8,7 @@ android {
applicationId
"cn.garymb.ygomobile"
minSdkVersion
21
targetSdkVersion
28
versionCode
35100101
0
versionCode
35100101
3
versionName
"3.5.1"
flavorDimensions
"versionCode"
vectorDrawables
.
useSupportLibrary
=
true
...
...
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