mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-16 16:16:04 -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);
|
||||
minecraftGLView.refreshSize();
|
||||
new Handler(Looper.getMainLooper()).postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mControlLayout.refreshControlButtonPositions();
|
||||
}
|
||||
}, 1000);
|
||||
runOnUiThread(() -> mControlLayout.refreshControlButtonPositions());
|
||||
}
|
||||
|
||||
@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() {
|
||||
android.os.Process.killProcess(android.os.Process.myPid());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user