📅  最后修改于: 2022-03-11 14:52:18.401000             🧑  作者: Mango
// go to android/app/src/main/java/com/yourPackageName/MainActivity.java
package com.yourPackageName;
import android.os.Bundle;
import com.facebook.react.ReactActivity;
// Add This Line
import android.view.WindowManager;
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "bannermaker";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Add this line
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
}
}