Browse Source

修改欢迎页点击崩溃问题

授权码生成工具
liup 3 months ago
parent
commit
5af30cb693
2 changed files with 9 additions and 2 deletions
  1. +1
    -2
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  2. +8
    -0
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java

+ 1
- 2
app/src/main/java/com/bonait/bnframework/business/MainInit.java View File

@@ -93,8 +93,7 @@ public class MainInit {
// activity生命周期管理
ActivityLifecycleManager.get().init(app);

// QMUI 框架初始化
QMUISwipeBackActivityManager.init(app);


// LitePal 数据库初始化
LitePal.initialize(app);


+ 8
- 0
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java View File

@@ -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)


Loading…
Cancel
Save