Ver código fonte

欢迎页面崩溃调试

授权码生成工具
pry 1 mês atrás
pai
commit
7407215816
3 arquivos alterados com 28 adições e 10 exclusões
  1. +1
    -1
      app/src/main/java/com/bonait/bnframework/business/MainInit.java
  2. +23
    -7
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java
  3. +4
    -2
      app/src/main/res/layout/activity_welcome.xml

+ 1
- 1
app/src/main/java/com/bonait/bnframework/business/MainInit.java Ver arquivo

@@ -77,7 +77,7 @@ public class MainInit {
public static void Init(Application app)
{
//0.全局异常捕获,保存为SD卡本级目录 crash
CrashHandler.getInstance().init(app);
// CrashHandler.getInstance().init(app);

//1.设置程序active,初始化Main函数进程,初始化消息日志
InitMsgLog();


+ 23
- 7
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java Ver arquivo

@@ -11,13 +11,16 @@ import androidx.recyclerview.widget.GridLayoutManager;

import android.util.DisplayMetrics;
import android.view.KeyEvent;
import android.view.MotionEvent;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.MainInit;
import com.bonait.bnframework.common.base.BaseActivity;
import com.bonait.bnframework.common.constant.ConfigName;
import com.bonait.bnframework.common.constant.Constants;
import com.bonait.bnframework.common.helper.CrashHandler;
import com.bonait.bnframework.common.utils.ScreenUtils;
import com.bonait.bnframework.manager.ActivityLifecycleManager;
import com.bonait.bnframework.modules.home.activity.BottomNavigation2Activity;
@@ -40,11 +43,18 @@ public class WelcomeActivity extends BaseActivity {
private final static int SELECT_MODE = 2;
private OkHttpClient.Builder builder;

@Override
public boolean onTouchEvent(MotionEvent event) {
return true;
// return super.onTouchEvent(event);
}


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_welcome);

CrashHandler.getInstance().init(MainApplication.getContext());
DisplayMetrics dm = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(dm);
int miDisplayWidth = dm.widthPixels;
@@ -110,8 +120,13 @@ public class WelcomeActivity extends BaseActivity {
handler.postDelayed(new Runnable() {
@Override
public void run() {
//判断token
doPost();
try{
//判断token
doPost();
}catch (Exception e){

}

}
}, 2000);
}
@@ -242,10 +257,11 @@ public class WelcomeActivity extends BaseActivity {
*/
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
return true;
}
return super.onKeyDown(keyCode, event);
return true;
// if (keyCode == KeyEvent.KEYCODE_BACK) {
// return true;
// }
// return super.onKeyDown(keyCode, event);
}

@Override


+ 4
- 2
app/src/main/res/layout/activity_welcome.xml Ver arquivo

@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<com.qmuiteam.qmui.widget.QMUIWindowInsetLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:focusable="false"
android:focusableInTouchMode="false"
tools:context=".modules.welcome.activity.WelcomeActivity">

<RelativeLayout
@@ -38,4 +40,4 @@

</RelativeLayout>

</com.qmuiteam.qmui.widget.QMUIWindowInsetLayout>
</RelativeLayout>

Carregando…
Cancelar
Salvar