From 5af30cb69303150924a9d70cb0bfa00e031df84b Mon Sep 17 00:00:00 2001 From: liup <1454939542@qq.com> Date: Wed, 18 Sep 2024 16:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=AC=A2=E8=BF=8E=E9=A1=B5?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E5=B4=A9=E6=BA=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonait/bnframework/business/MainInit.java | 3 +-- .../modules/welcome/activity/WelcomeActivity.java | 8 ++++++++ 2 files changed, 9 insertions(+), 2 deletions(-) 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)