添加复制
This commit is contained in:
@@ -58,6 +58,16 @@ public class MainActivity extends GameActivity implements FaceLandmarkerHelper.L
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
if (!AssetsCopyUtil.isExternalStorageAvailable()) {
|
||||
Log.w(TAG, "External storage not available, skipping assets copy");
|
||||
return;
|
||||
}
|
||||
|
||||
AssetsCopyUtil.copyAssetsToAppFiles(this, "assets");
|
||||
AssetsCopyUtil.copyAssetsToAppFiles(this, "shaders");
|
||||
|
||||
|
||||
String native_lib_name = getResources().getString(R.string.native_lib_name);
|
||||
try {
|
||||
System.loadLibrary(native_lib_name);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 底层:CameraX 预览 -->
|
||||
<androidx.camera.view.PreviewView
|
||||
android:id="@+id/previewView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- 上层:GameActivity 的容器 -->
|
||||
<FrameLayout
|
||||
android:id="@+id/gameActivityContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
</FrameLayout>
|
||||
Reference in New Issue
Block a user