2023-04-10 16:02:53 +03:00
|
|
|
package mw.gri.android;
|
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.system.ErrnoException;
|
|
|
|
import android.system.Os;
|
2023-04-11 00:11:21 +03:00
|
|
|
import com.google.androidgamesdk.GameActivity;
|
2023-04-10 16:02:53 +03:00
|
|
|
|
2023-04-11 00:11:21 +03:00
|
|
|
public class MainActivity extends GameActivity {
|
2023-04-10 16:02:53 +03:00
|
|
|
|
|
|
|
static {
|
|
|
|
System.loadLibrary("grin_android");
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
try {
|
|
|
|
Os.setenv("HOME", getExternalFilesDir("").getPath(), true);
|
|
|
|
} catch (ErrnoException e) {
|
|
|
|
throw new RuntimeException(e);
|
|
|
|
}
|
2023-04-10 23:42:45 +03:00
|
|
|
|
2023-04-10 16:02:53 +03:00
|
|
|
super.onCreate(savedInstanceState);
|
2023-04-10 23:42:45 +03:00
|
|
|
|
|
|
|
int navBarHeight = Utils.getNavigationBarHeight(getApplicationContext());
|
|
|
|
// int statusBarHeight = Utils.getStatusBarHeight(getApplicationContext());
|
|
|
|
findViewById(android.R.id.content).setPadding(0, 0, 0, navBarHeight);
|
2023-04-10 16:02:53 +03:00
|
|
|
}
|
|
|
|
}
|