mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 08:05:34 -04:00
Proper resize when hoping back into the app
This commit is contained in:
parent
5eec6989fb
commit
6afc22e474
@ -200,14 +200,17 @@ public class BaseMainActivity extends BaseActivity {
|
|||||||
|
|
||||||
Tools.updateWindowSize(this);
|
Tools.updateWindowSize(this);
|
||||||
minecraftGLView.refreshSize();
|
minecraftGLView.refreshSize();
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
runOnUiThread(() -> mControlLayout.refreshControlButtonPositions());
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
mControlLayout.refreshControlButtonPositions();
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onPostResume() {
|
||||||
|
super.onPostResume();
|
||||||
|
if(minecraftGLView != null) // Useful when backing out of the app
|
||||||
|
new Handler(Looper.getMainLooper()).postDelayed(() -> minecraftGLView.refreshSize(), 500);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void fullyExit() {
|
public static void fullyExit() {
|
||||||
android.os.Process.killProcess(android.os.Process.myPid());
|
android.os.Process.killProcess(android.os.Process.myPid());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user