mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-10 13:16:04 -04:00
code rework
This commit is contained in:
parent
7a55074fb4
commit
d451ee4dfe
@ -27,10 +27,6 @@
|
|||||||
<category android:name="android.intent.category.LAUNCHER" />
|
<category android:name="android.intent.category.LAUNCHER" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=“.Activity”
|
|
||||||
android:theme="@style/AppTheme.Fullscreen"/>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:screenOrientation="sensorLandscape"
|
android:screenOrientation="sensorLandscape"
|
||||||
|
@ -36,7 +36,7 @@ import android.app.AlertDialog;
|
|||||||
|
|
||||||
public class MainActivity extends AppCompatActivity implements OnTouchListener, OnClickListener
|
public class MainActivity extends AppCompatActivity implements OnTouchListener, OnClickListener
|
||||||
{
|
{
|
||||||
public static final String initText = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ";
|
public static final String initText = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA "; //onResume
|
||||||
|
|
||||||
private static int[] hotbarKeys = {
|
private static int[] hotbarKeys = {
|
||||||
Keyboard.KEY_1, Keyboard.KEY_2, Keyboard.KEY_3,
|
Keyboard.KEY_1, Keyboard.KEY_2, Keyboard.KEY_3,
|
||||||
@ -132,11 +132,22 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
public void onCreate(Bundle savedInstanceState)
|
public void onCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.main);
|
setContentView(R.layout.main);
|
||||||
requestWindowFeature(Window.FEATURE_NO_TITLE); // for hiding title
|
|
||||||
getWindow().getDecorView().setSystemUiVisibility(SYSTEM_UI_FLAG_IMMERSIVE_STICKY |
|
|
||||||
SYSTEM_UI_FLAG_FULLSCREEN | SYSTEM_UI_FLAG_HIDE_NAVIGATION |
|
final View decorView = getWindow().getDecorView();
|
||||||
SYSTEM_UI_FLAG_LAYOUT_STABLE | SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
|
decorView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onSystemUiVisibilityChange(int visibility) {
|
||||||
|
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
|
||||||
|
decorView.setSystemUiVisibility(
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
ExitManager.setExitTrappedListener(new ExitManager.ExitTrappedListener(){
|
ExitManager.setExitTrappedListener(new ExitManager.ExitTrappedListener(){
|
||||||
@ -195,7 +206,7 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
/*
|
/*
|
||||||
if (mVersionInfo.arguments != null) {
|
if (mVersionInfo.arguments != null) {
|
||||||
System.loadLibrary("lwjgl32");
|
System.loadLibrary("lwjgl32");
|
||||||
System.loadLibrary("lwjgl_opengl32");
|
System.loadLibrary("lwjgl_opengl32"); //resume
|
||||||
System.loadLibrary("lwjgl_stb32");
|
System.loadLibrary("lwjgl_stb32");
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
@ -734,6 +745,9 @@ public class MainActivity extends AppCompatActivity implements OnTouchListener,
|
|||||||
super.onResume();
|
super.onResume();
|
||||||
mIsResuming = true;
|
mIsResuming = true;
|
||||||
glSurfaceView.requestRender();
|
glSurfaceView.requestRender();
|
||||||
|
final int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
||||||
|
final View decorView = getWindow().getDecorView();
|
||||||
|
decorView.setSystemUiVisibility(uiOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user