Add custom font and configure React Native project settings

- Added the Pixel Cyr font to the mobile assets directory.
- Created a new React Native configuration file to specify project settings, including Android source directory, app name, and package name.
- Configured asset linking for the mobile assets.
This commit is contained in:
moonpower
2025-11-23 13:19:06 +03:00
parent 40ff6e2d15
commit 30d4e57a3c
23 changed files with 814 additions and 247 deletions
@@ -2,6 +2,7 @@ package com.nanodata.armsx;
import android.app.Activity;
import android.content.Intent;
import android.content.pm.ActivityInfo;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -36,12 +37,29 @@ public class ARMSXModule extends ReactContextBaseJavaModule {
return;
}
forceLandscapeInternal(host);
Intent intent = new Intent(host, EmulatorActivity.class);
intent.putExtra(EmulatorActivity.EXTRA_NATIVE_ARGS, readableArrayToStrings(args));
host.startActivity(intent);
promise.resolve(true);
}
@ReactMethod
public void forceLandscape(Promise promise) {
Activity host = getCurrentActivity();
if (host == null) {
promise.reject("no_activity", "Activity not available");
return;
}
forceLandscapeInternal(host);
promise.resolve(true);
}
private void forceLandscapeInternal(@NonNull Activity host) {
host.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE);
}
private @Nullable String[] readableArrayToStrings(@Nullable ReadableArray array) {
if (array == null) {
return null;