diff --git a/app/src/main/java/com/bonait/bnframework/business/MainInit.java b/app/src/main/java/com/bonait/bnframework/business/MainInit.java index b01f5659..d70309d4 100644 --- a/app/src/main/java/com/bonait/bnframework/business/MainInit.java +++ b/app/src/main/java/com/bonait/bnframework/business/MainInit.java @@ -93,8 +93,7 @@ public class MainInit { // activity生命周期管理 ActivityLifecycleManager.get().init(app); - // QMUI 框架初始化 - QMUISwipeBackActivityManager.init(app); + // LitePal 数据库初始化 LitePal.initialize(app); diff --git a/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java b/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java index 53a422e5..bb810c6f 100644 --- a/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java +++ b/app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java @@ -27,6 +27,7 @@ import com.bonait.bnframework.modules.home.activity.BottomNavigation2Activity; import com.bonait.bnframework.test.TestActivity; import com.bonait.bnframework.ui.util.DisplayManager; import com.lzy.okgo.OkGo; +import com.qmuiteam.qmui.arch.QMUISwipeBackActivityManager; import okhttp3.OkHttpClient; import pub.devrel.easypermissions.AfterPermissionGranted; @@ -53,6 +54,8 @@ public class WelcomeActivity extends BaseActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + // QMUI 框架初始化 + QMUISwipeBackActivityManager.init(ConfigName.getInstance().app); setContentView(R.layout.activity_welcome); CrashHandler.getInstance().init(MainApplication.getContext()); DisplayMetrics dm = new DisplayMetrics(); @@ -264,6 +267,11 @@ public class WelcomeActivity extends BaseActivity { // return super.onKeyDown(keyCode, event); } + @Override + public boolean dispatchKeyEvent(KeyEvent event) { + return true; + } + @Override protected void onDestroy() { if(builder!=null)