diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
index b81c2b1..ab0238a 100644
Binary files a/.idea/caches/build_file_checksums.ser and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..681f41a
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ xmlns:android
+
+ ^$
+
+
+
+
+
+
+
+
+ xmlns:.*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*:id
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ .*:name
+
+ http://schemas.android.com/apk/res/android
+
+
+
+
+
+
+
+
+ name
+
+ ^$
+
+
+
+
+
+
+
+
+ style
+
+ ^$
+
+
+
+
+
+
+
+
+ .*
+
+ ^$
+
+
+ BY_NAME
+
+
+
+
+
+
+ .*
+
+ http://schemas.android.com/apk/res/android
+
+
+ ANDROID_ATTRIBUTE_ORDER
+
+
+
+
+
+
+ .*
+
+ .*
+
+
+ BY_NAME
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index c0f68ed..199f869 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -25,7 +25,7 @@
-
+
diff --git a/RefreshRecyclerView/build.gradle b/RefreshRecyclerView/build.gradle
index f6a9437..a156ea1 100644
--- a/RefreshRecyclerView/build.gradle
+++ b/RefreshRecyclerView/build.gradle
@@ -19,7 +19,7 @@ android {
}
dependencies {
- implementation 'com.android.support:recyclerview-v7:25.0.0'
+ implementation 'androidx.recyclerview:recyclerview:1.0.0'
}
ext {
diff --git a/RefreshRecyclerView/src/main/java/cn/lemon/view/RefreshRecyclerView.java b/RefreshRecyclerView/src/main/java/cn/lemon/view/RefreshRecyclerView.java
index 70e3ad7..d01c78b 100644
--- a/RefreshRecyclerView/src/main/java/cn/lemon/view/RefreshRecyclerView.java
+++ b/RefreshRecyclerView/src/main/java/cn/lemon/view/RefreshRecyclerView.java
@@ -2,16 +2,17 @@ package cn.lemon.view;
import android.content.Context;
import android.content.res.TypedArray;
-import android.support.annotation.ColorInt;
-import android.support.annotation.ColorRes;
-import android.support.v4.widget.SwipeRefreshLayout;
-import android.support.v7.widget.GridLayoutManager;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.ColorInt;
+import androidx.annotation.ColorRes;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
+
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.widget.FrameLayout;
-import android.widget.TextView;
+
import java.util.ArrayList;
import java.util.List;
import cn.lemon.view.adapter.Action;
diff --git a/RefreshRecyclerView/src/main/java/cn/lemon/view/SpaceItemDecoration.java b/RefreshRecyclerView/src/main/java/cn/lemon/view/SpaceItemDecoration.java
index 3dff85d..3d19fe8 100644
--- a/RefreshRecyclerView/src/main/java/cn/lemon/view/SpaceItemDecoration.java
+++ b/RefreshRecyclerView/src/main/java/cn/lemon/view/SpaceItemDecoration.java
@@ -1,7 +1,7 @@
package cn.lemon.view;
import android.graphics.Rect;
-import android.support.v7.widget.RecyclerView;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.View;
/**
* Created by linlongxin on 2015/12/19.
diff --git a/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/BaseViewHolder.java b/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/BaseViewHolder.java
index 6ec791c..64bd605 100644
--- a/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/BaseViewHolder.java
+++ b/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/BaseViewHolder.java
@@ -1,7 +1,7 @@
package cn.lemon.view.adapter;
-import android.support.annotation.IdRes;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.IdRes;
+import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/RecyclerAdapter.java b/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/RecyclerAdapter.java
index 6e1b4b3..35a7fba 100644
--- a/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/RecyclerAdapter.java
+++ b/RefreshRecyclerView/src/main/java/cn/lemon/view/adapter/RecyclerAdapter.java
@@ -2,8 +2,8 @@ package cn.lemon.view.adapter;
import android.content.Context;
import android.os.Message;
-import android.support.annotation.LayoutRes;
-import android.support.v7.widget.RecyclerView;
+import androidx.annotation.LayoutRes;
+import androidx.recyclerview.widget.RecyclerView;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/RefreshRecyclerView/src/main/res/layout/view_refresh_recycler.xml b/RefreshRecyclerView/src/main/res/layout/view_refresh_recycler.xml
index 91648b7..6acd5e1 100644
--- a/RefreshRecyclerView/src/main/res/layout/view_refresh_recycler.xml
+++ b/RefreshRecyclerView/src/main/res/layout/view_refresh_recycler.xml
@@ -1,14 +1,14 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 245aff2..527550f 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,28 +1,28 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 28
+ compileSdkVersion 29
defaultConfig {
//applicationId "com.yutou.jianrmg_v2"
applicationId "com.yutou.jianr_mg"
minSdkVersion 19
- targetSdkVersion 28
+ targetSdkVersion 29
versionCode 2
- versionName "2.2"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ versionName "2.3"
+ testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
signingConfigs {
release {
- storeFile file('D:\\AndroidKeys\\yutou.jks')
+ storeFile file('/media/yutou/_dde_data/AndroidKeys/yutou.jks')
storePassword '34864394'
keyAlias 'yutou'
keyPassword '34864394'
}
debug {
- storeFile file('D:\\AndroidKeys\\yutou.jks')
+ storeFile file('/media/yutou/_dde_data/AndroidKeys/yutou.jks')
storePassword '34864394'
keyAlias 'yutou'
keyPassword '34864394'
@@ -55,16 +55,12 @@ configurations.all {
}
}
dependencies {
- implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
//noinspection GradleCompatible
- implementation 'com.android.support:appcompat-v7:28.0.0'
- implementation 'com.android.support.constraint:constraint-layout:1.1.3'
+ implementation 'androidx.appcompat:appcompat:1.0.0'
+ implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- //implementation 'com.android.support:design:26.1.0'
- testImplementation 'junit:junit:4.12'
- androidTestImplementation 'com.android.support.test:runner:1.0.2'
- androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//okhttp
implementation 'com.squareup.okhttp3:okhttp:3.11.0'
@@ -125,28 +121,32 @@ dependencies {
implementation 'com.github.arcadefire:nice-spinner:1.3.4'
//glide
- implementation 'com.github.bumptech.glide:glide:4.9.0'
- annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
+ implementation 'com.github.bumptech.glide:glide:4.10.0'
+ annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
//友盟
- implementation 'com.umeng.umsdk:analytics:8.0.0'
+ implementation 'com.umeng.umsdk:analytics:8.1.3'
implementation 'com.umeng.umsdk:common:2.0.0'
//友盟推动
implementation 'com.umeng.umsdk:utdid:1.1.5.3'
- implementation 'com.umeng.umsdk:push:5.0.2'
+ implementation 'com.umeng.umsdk:push:6.0.1'
/* api project(path: ':BaseModel')
- api project(path: ':GameDataModel')
- api project(path: ':AppHome')
- api project(path: ':MgListModel')
- api project(path: ':ResModl')
- api project(path: ':UserModel')*/
- implementation files('libs/tbs_sdk_thirdapp_v3.6.0.1371_43624_sharewithdownload_withoutGame_obfs_20181106_121046.jar')
+ api project(path: ':GameDataModel')
+ api project(path: ':AppHome')
+ api project(path: ':MgListModel')
+ api project(path: ':ResModl')
+ api project(path: ':UserModel')*/
+
//七牛云
implementation 'com.qiniu:qiniu-android-sdk:7.3.15'
+
//zip4j
- implementation group: 'net.lingala.zip4j', name: 'zip4j', version: '1.3.3'
+ implementation 'net.lingala.zip4j:zip4j:1.3.3'
+
//卡顿检测
- // implementation 'com.github.markzhai:blockcanary-android:1.5.0'
+
+ // implementation 'com.github.markzhai:blockcanary-android:1.5.0'
+ implementation files('libs/tbs_sdk_thirdapp_v4.3.0.1148_43697_sharewithdownloadwithfile_withoutGame_obfs_20190805_175505.jar')
}
diff --git a/app/libs/GDTSDK.unionNormal.4.100.970.aar b/app/libs/GDTSDK.unionNormal.4.100.970.aar
new file mode 100644
index 0000000..ff45cb3
Binary files /dev/null and b/app/libs/GDTSDK.unionNormal.4.100.970.aar differ
diff --git a/app/libs/GDTUnionSDK.4.28.902.min.jar b/app/libs/GDTUnionSDK.4.28.902.min.jar
deleted file mode 100644
index f45dd2d..0000000
Binary files a/app/libs/GDTUnionSDK.4.28.902.min.jar and /dev/null differ
diff --git a/app/libs/tbs_sdk_thirdapp_v3.6.0.1371_43624_sharewithdownload_withoutGame_obfs_20181106_121046.jar b/app/libs/tbs_sdk_thirdapp_v3.6.0.1371_43624_sharewithdownload_withoutGame_obfs_20181106_121046.jar
deleted file mode 100644
index 02e4764..0000000
Binary files a/app/libs/tbs_sdk_thirdapp_v3.6.0.1371_43624_sharewithdownload_withoutGame_obfs_20181106_121046.jar and /dev/null differ
diff --git a/app/libs/tbs_sdk_thirdapp_v4.3.0.1148_43697_sharewithdownloadwithfile_withoutGame_obfs_20190805_175505.jar b/app/libs/tbs_sdk_thirdapp_v4.3.0.1148_43697_sharewithdownloadwithfile_withoutGame_obfs_20190805_175505.jar
new file mode 100644
index 0000000..e43c52c
Binary files /dev/null and b/app/libs/tbs_sdk_thirdapp_v4.3.0.1148_43697_sharewithdownloadwithfile_withoutGame_obfs_20190805_175505.jar differ
diff --git a/app/src/main/java/Interfaces/BaseFragmeneInerface.java b/app/src/main/java/Interfaces/BaseFragmeneInerface.java
index 65e2eee..d1119c8 100644
--- a/app/src/main/java/Interfaces/BaseFragmeneInerface.java
+++ b/app/src/main/java/Interfaces/BaseFragmeneInerface.java
@@ -2,7 +2,7 @@ package Interfaces;
import android.content.Context;
import android.os.Bundle;
-import android.support.annotation.Nullable;
+import androidx.annotation.Nullable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Adapters/ModRecyclerAdapter.java b/app/src/main/java/com/yutou/jianr_mg/Adapters/ModRecyclerAdapter.java
index 2da7ed1..ce98296 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Adapters/ModRecyclerAdapter.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Adapters/ModRecyclerAdapter.java
@@ -2,7 +2,7 @@ package com.yutou.jianr_mg.Adapters;
import android.content.Context;
import android.content.Intent;
-import android.support.v7.widget.PopupMenu;
+import androidx.appcompat.widget.PopupMenu;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -16,7 +16,6 @@ import com.yutou.jianr_mg.Data.TMod;
import com.yutou.jianr_mg.Data.TModtype;
import com.yutou.jianr_mg.Data.ZsShipType;
import com.yutou.jianr_mg.Interfaces.HttpInterface;
-import com.yutou.jianr_mg.Interfaces.ModInterface;
import com.yutou.jianr_mg.Network.HttpApi;
import com.yutou.jianr_mg.Network.HttpUtils;
import com.yutou.jianr_mg.R;
@@ -141,7 +140,12 @@ public class ModRecyclerAdapter extends RecyclerAdapter {
@Override
public void setData(TMod data) {
super.setData(data);
- imageLoader.displayImage(AppData.appConfig.getDownloadhome() + data.getIcon(), icon);
+ try {
+ imageLoader.displayImage(AppData.appConfig.getDownloadhome() + data.getIcon(), icon);
+ }catch (Exception e){
+ e.printStackTrace();
+ }
+
title.setText(data.getTitle());
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/Adapters/ViewPagerAdapter.java b/app/src/main/java/com/yutou/jianr_mg/Adapters/ViewPagerAdapter.java
index 0a0fe61..e6c4225 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Adapters/ViewPagerAdapter.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Adapters/ViewPagerAdapter.java
@@ -1,8 +1,8 @@
package com.yutou.jianr_mg.Adapters;
-import android.support.v4.app.Fragment;
-import android.support.v4.app.FragmentManager;
-import android.support.v4.app.FragmentPagerAdapter;
+import androidx.fragment.app.Fragment;
+import androidx.fragment.app.FragmentManager;
+import androidx.fragment.app.FragmentPagerAdapter;
import java.util.List;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Application.java b/app/src/main/java/com/yutou/jianr_mg/Application.java
index 6b420be..9edb2ca 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Application.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Application.java
@@ -110,7 +110,8 @@ public class Application extends android.app.Application {
Log.e("QDSDK", "加载内核是否成功:" + b);
}
});
- } catch (Exception ignored) {
+ } catch (Exception e) {
+ e.printStackTrace();
}
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/Data/SystemData.java b/app/src/main/java/com/yutou/jianr_mg/Data/SystemData.java
index 169282e..0306aa4 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Data/SystemData.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Data/SystemData.java
@@ -4,7 +4,7 @@ import android.Manifest;
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
-import android.support.v4.app.ActivityCompat;
+import androidx.core.app.ActivityCompat;
import android.telephony.TelephonyManager;
import com.yutou.jianr_mg.Application;
@@ -25,7 +25,7 @@ public class SystemData {
public SystemData() {
if (Utils.getApplicationPackName(Application.application, AppData.magicPackageName)
- || new File(Utils.getSDCardPath() + "Android/data/com.huanmeng.zhanjian2/files/MagicBox/").exists()) {
+ || new File( "/sdcard/Android/data/com.huanmeng.zhanjian2/files/MagicBox/").exists()) {
isInstallClient = true;
} else {
isInstallClient = false;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Data/TMod.java b/app/src/main/java/com/yutou/jianr_mg/Data/TMod.java
index 9e7da42..4c9f038 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Data/TMod.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Data/TMod.java
@@ -1,6 +1,6 @@
package com.yutou.jianr_mg.Data;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
public class TMod implements Comparable{
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameData.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameData.java
index f8fdf0a..860e9b4 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameData.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameData.java
@@ -2,19 +2,14 @@ package com.yutou.jianr_mg.Fragments;
import android.content.Context;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v4.view.ViewPager;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager.widget.ViewPager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.LinearLayout;
-import com.github.mikephil.charting.charts.PieChart;
-import com.github.mikephil.charting.data.PieData;
-import com.github.mikephil.charting.data.PieDataSet;
-import com.github.mikephil.charting.data.PieEntry;
import com.yutou.jianr_mg.Adapters.ViewPagerAdapter;
import com.yutou.jianr_mg.Fragments.GameDataFragments.DropFragment;
import com.yutou.jianr_mg.Fragments.GameDataFragments.WarFragment;
@@ -23,7 +18,6 @@ import com.yutou.jianr_mg.R;
import java.util.ArrayList;
import java.util.List;
-import Interfaces.BaseFragmeneInerface;
import me.majiajie.pagerbottomtabstrip.NavigationController;
import me.majiajie.pagerbottomtabstrip.PageNavigationView;
import me.majiajie.pagerbottomtabstrip.listener.OnTabItemSelectedListener;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/DropFragment.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/DropFragment.java
index 9a33d61..755be80 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/DropFragment.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/DropFragment.java
@@ -2,10 +2,10 @@ package com.yutou.jianr_mg.Fragments.GameDataFragments;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.LinearLayoutManager;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
import android.util.ArrayMap;
import android.view.LayoutInflater;
import android.view.View;
@@ -28,12 +28,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
-import java.util.Locale;
import java.util.Map;
-import java.util.Timer;
import cn.lemon.view.RefreshRecyclerView;
-import cn.lemon.view.adapter.Action;
public class DropFragment extends Fragment {
private static DropFragment fragment;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarFragment.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarFragment.java
index c7285ea..e54f475 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarFragment.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarFragment.java
@@ -1,23 +1,21 @@
package com.yutou.jianr_mg.Fragments.GameDataFragments;
import android.os.Bundle;
-import android.os.Handler;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.LinearLayoutManager;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
-import com.yutou.jianr_mg.Adapters.GameDataAdapters.DropAdapter;
import com.yutou.jianr_mg.Adapters.GameDataAdapters.WarAdapter;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Databases.JianRDataDataBase;
import com.yutou.jianr_mg.R;
-import com.yutou.jianr_mg.Tools.Utils;
import org.angmarch.views.NiceSpinner;
import org.json.JSONObject;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/DaytimeFragment.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/DaytimeFragment.java
index 4d5cadb..df8e4a3 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/DaytimeFragment.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/DaytimeFragment.java
@@ -1,9 +1,9 @@
package com.yutou.jianr_mg.Fragments.GameDataFragments.WarLogFragments;
import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/NightFragment.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/NightFragment.java
index a5461cc..9ad2256 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/NightFragment.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/GameDataFragments/WarLogFragments/NightFragment.java
@@ -1,6 +1,6 @@
package com.yutou.jianr_mg.Fragments.GameDataFragments.WarLogFragments;
-import android.support.v4.app.Fragment;
+import androidx.fragment.app.Fragment;
public class NightFragment extends Fragment {
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/Home.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/Home.java
index e94462b..bd1fea7 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/Home.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/Home.java
@@ -2,10 +2,10 @@ package com.yutou.jianr_mg.Fragments;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.LinearLayoutCompat;
-import android.support.v7.widget.LinearLayoutManager;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.appcompat.widget.LinearLayoutCompat;
+import androidx.recyclerview.widget.LinearLayoutManager;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/MGList.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/MGList.java
index fe27b80..c03f639 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/MGList.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/MGList.java
@@ -2,10 +2,10 @@ package com.yutou.jianr_mg.Fragments;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.GridLayoutManager;
-import android.support.v7.widget.LinearLayoutCompat;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.appcompat.widget.LinearLayoutCompat;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragmentData.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragmentData.java
index 1cf8d12..f338f74 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragmentData.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragmentData.java
@@ -3,8 +3,8 @@ package com.yutou.jianr_mg.Fragments;
import android.app.Activity;
import android.content.Context;
import android.os.Handler;
-import android.support.v7.widget.GridLayoutManager;
-import android.support.v7.widget.LinearLayoutCompat;
+import androidx.recyclerview.widget.GridLayoutManager;
+import androidx.appcompat.widget.LinearLayoutCompat;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_0.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_0.java
index 4bd4a23..791f403 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_0.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_0.java
@@ -1,8 +1,8 @@
package com.yutou.jianr_mg.Fragments;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_1.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_1.java
index bd878b6..041e1db 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_1.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_1.java
@@ -1,8 +1,8 @@
package com.yutou.jianr_mg.Fragments;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_2.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_2.java
index 13b02e0..7ad618d 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_2.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/ModListFragment_2.java
@@ -1,8 +1,8 @@
package com.yutou.jianr_mg.Fragments;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/My.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/My.java
index 9f68cb7..2ea84a4 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/My.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/My.java
@@ -1,12 +1,10 @@
package com.yutou.jianr_mg.Fragments;
-import android.app.Activity;
-import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.view.Gravity;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -14,7 +12,6 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;
-import android.widget.Toast;
import com.bumptech.glide.Glide;
import com.nostra13.universalimageloader.core.ImageLoader;
@@ -22,9 +19,7 @@ import com.yutou.jianr_mg.Adapters.MyItemGridViewAdapter;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Data.UUserdata;
import com.yutou.jianr_mg.Data.User;
-import com.yutou.jianr_mg.Network.HttpApi;
import com.yutou.jianr_mg.R;
-import com.yutou.jianr_mg.Tools.Log;
import com.yutou.jianr_mg.Tools.Utils;
import com.yutou.jianr_mg.views.UserDataActivity;
@@ -32,7 +27,6 @@ import com.yutou.jianr_mg.views.UserDataActivity;
import java.util.ArrayList;
import java.util.List;
-import Interfaces.BaseFragmeneInerface;
import jp.wasabeef.glide.transformations.BlurTransformation;
import static com.bumptech.glide.request.RequestOptions.bitmapTransform;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/Test.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/Test.java
index 55e558d..323c663 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/Test.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/Test.java
@@ -1,23 +1,18 @@
package com.yutou.jianr_mg.Fragments;
import android.app.Activity;
-import android.content.ComponentName;
-import android.content.Intent;
-import android.content.ServiceConnection;
import android.os.Bundle;
-import android.os.IBinder;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.PopupMenu;
+
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.appcompat.widget.PopupMenu;
import android.view.Gravity;
import android.view.LayoutInflater;
-import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
-import com.yutou.jianr_mg.R;
import com.yutou.jianr_mg.services.DownloadService;
/**
diff --git a/app/src/main/java/com/yutou/jianr_mg/Fragments/UtilsFragments.java b/app/src/main/java/com/yutou/jianr_mg/Fragments/UtilsFragments.java
index a8a813c..21a6bb5 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Fragments/UtilsFragments.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Fragments/UtilsFragments.java
@@ -3,10 +3,10 @@ package com.yutou.jianr_mg.Fragments;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v7.widget.GridLayoutManager;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.recyclerview.widget.GridLayoutManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -88,6 +88,7 @@ public class UtilsFragments extends Fragment {
JSONObject json=new JSONObject(string);
datas= JSON.parseArray(json.getJSONArray("data").toString(),MAppTools.class);
setLocalData();
+ debug();
handler.post(()->setData());
}catch (Exception e){
e.printStackTrace();
@@ -101,6 +102,10 @@ public class UtilsFragments extends Fragment {
}catch (Exception e){
e.printStackTrace();
}
+ }
+ private void debug(){
+
+
}
private Map map;
private void setLocalData(){
diff --git a/app/src/main/java/com/yutou/jianr_mg/LoadingActivity.java b/app/src/main/java/com/yutou/jianr_mg/LoadingActivity.java
index 954966b..cc26fe2 100644
--- a/app/src/main/java/com/yutou/jianr_mg/LoadingActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/LoadingActivity.java
@@ -9,11 +9,11 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.constraint.ConstraintLayout;
-import android.support.v4.app.ActivityCompat;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.core.app.ActivityCompat;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
@@ -29,7 +29,6 @@ import com.qq.e.ads.splash.SplashAD;
import com.qq.e.ads.splash.SplashADListener;
import com.qq.e.comm.util.AdError;
import com.umeng.analytics.MobclickAgent;
-import com.umeng.message.UmengMessageHandler;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Data.MAdConfig;
import com.yutou.jianr_mg.Data.MGamePackname;
@@ -338,7 +337,6 @@ public class LoadingActivity extends AppCompatActivity {
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
-
if (AppData.appConfig != null && !AppData.appConfig.getApkVersion().equals(code)) {
MaterialDialog dialog = new MaterialDialog(this);
dialog.setTitle("检测到更新");
@@ -443,11 +441,13 @@ public class LoadingActivity extends AppCompatActivity {
dialog.setTitle(">__<");
dialog.setMessage("缺少起床的必要权限哦!");
dialog.setNegativeButton("不给", view -> {
- Utils.toast(LoadingActivity.this, "哼,小气");
- handler.postDelayed(() -> {
+ Utils.toast(LoadingActivity.this, "哼,小气(可能会发生意外闪退问题)");
+ /* handler.postDelayed(() -> {
ActivitysManager.AppExit(LoadingActivity.this);
dialog.dismiss();
- }, 300);
+ }, 300);*/
+ dialog.dismiss();
+ ready(1);
});
dialog.setPositiveButton("拿去吧", view -> {
ActivityCompat.requestPermissions(LoadingActivity.this, AppPermissions.permissions, AppPermissions.REQUEST_CODE);
@@ -455,6 +455,7 @@ public class LoadingActivity extends AppCompatActivity {
});
dialog.show();
} else {
+ Utils.isPermissions=true;
ready(1);
}
}
@@ -466,7 +467,7 @@ public class LoadingActivity extends AppCompatActivity {
return;
}
AdTools.upload(AdTools.Open,AdTools.req);
- new SplashAD(this, adLayout, ad.getAppid(), ad.getPosid(), new SplashADListener() {
+ SplashAD splashAD= new SplashAD(this, ad.getAppid(), ad.getPosid(), new SplashADListener() {
@Override
public void onADDismissed() {
start();
@@ -497,6 +498,7 @@ public class LoadingActivity extends AppCompatActivity {
AdTools.upload(AdTools.Open,AdTools.show);
}
});
+ splashAD.fetchAndShowIn(adLayout);
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/MainActivity.java b/app/src/main/java/com/yutou/jianr_mg/MainActivity.java
index d225f76..87dbc8a 100644
--- a/app/src/main/java/com/yutou/jianr_mg/MainActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/MainActivity.java
@@ -2,9 +2,9 @@ package com.yutou.jianr_mg;
import android.os.Bundle;
import android.os.Handler;
-import android.support.v4.app.Fragment;
-import android.support.v4.view.ViewPager;
-import android.support.v7.app.AppCompatActivity;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager.widget.ViewPager;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.KeyEvent;
import android.widget.Toast;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Network/HttpApi.java b/app/src/main/java/com/yutou/jianr_mg/Network/HttpApi.java
index 4db2b8e..ca0a4d4 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Network/HttpApi.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Network/HttpApi.java
@@ -5,11 +5,11 @@ package com.yutou.jianr_mg.Network;
*/
public class HttpApi {
- // public static final String HOME="http://jianr.jianrmod.cn/";
+ public static final String HOME="http://jianr.jianrmod.cn/";
//public static final String HOME = "http://192.168.31.240:8088/"; //zzz_gz wifi
// public static final String HOME = "http://192.168.43.68:8088/"; //zzz_gz wifi
//public static final String HOME = "http://192.168.137.1:8088/"; //笔记本本身WIFI
- public static final String HOME = "http://192.168.1.84:8088/"; //公司
+ //public static final String HOME = "http://192.168.1.84:8088/"; //公司
public static final String HOME_URL=HOME+"android/"; //服务器
public static final String MOD_ALL = "mod/all.do";
diff --git a/app/src/main/java/com/yutou/jianr_mg/Network/HttpUtils.java b/app/src/main/java/com/yutou/jianr_mg/Network/HttpUtils.java
index 7b32ef3..b493d3b 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Network/HttpUtils.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Network/HttpUtils.java
@@ -1,6 +1,7 @@
package com.yutou.jianr_mg.Network;
+import com.yutou.jianr_mg.Application;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Interfaces.DownloadFileInerface;
import com.yutou.jianr_mg.Interfaces.HttpInterface;
@@ -155,6 +156,7 @@ public class HttpUtils {
} catch (Exception e) {
e.printStackTrace();
AppData.handler.post(() -> downloadFileInerface.over(false));
+ Utils.toast(Application.application,"下载文件发生错误!");
}
}
});
diff --git a/app/src/main/java/com/yutou/jianr_mg/Tools/ModUtils.java b/app/src/main/java/com/yutou/jianr_mg/Tools/ModUtils.java
index 441d518..a3d4f85 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Tools/ModUtils.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Tools/ModUtils.java
@@ -13,6 +13,7 @@ import android.widget.Toast;
import com.alibaba.fastjson.JSON;
import com.kaopiz.kprogresshud.KProgressHUD;
+import com.yutou.jianr_mg.Application;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Data.MGamePackname;
import com.yutou.jianr_mg.Data.TMod;
@@ -261,7 +262,13 @@ public class ModUtils {
}else{
order.put("args",new String[]{srcs.get(i).getAbsolutePath(),"files:" + paths.get(i).replace("/files/","")+srcs.get(i).getName()});
}
- MagicBoxService.init().setOrder(order, data -> { //先备份
+ MagicBoxService service= MagicBoxService.init();
+ if(service==null){
+ Utils.toast(Application.application,"没有安装专用客户端");
+ modInterface.onAction(false,0);
+ return;
+ }
+ service.setOrder(order, data -> { //先备份
try {
if(!isBackup){//如果不需要备份则按照安装逻辑进行
i++;
diff --git a/app/src/main/java/com/yutou/jianr_mg/Tools/MyFileProvider.java b/app/src/main/java/com/yutou/jianr_mg/Tools/MyFileProvider.java
index d0f33b9..4a5fca8 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Tools/MyFileProvider.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Tools/MyFileProvider.java
@@ -1,6 +1,6 @@
package com.yutou.jianr_mg.Tools;
-import android.support.v4.content.FileProvider;
+import androidx.core.content.FileProvider;
public class MyFileProvider extends FileProvider {
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/Tools/Utils.java b/app/src/main/java/com/yutou/jianr_mg/Tools/Utils.java
index 6f0872d..232a99b 100644
--- a/app/src/main/java/com/yutou/jianr_mg/Tools/Utils.java
+++ b/app/src/main/java/com/yutou/jianr_mg/Tools/Utils.java
@@ -7,8 +7,9 @@ import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.net.Uri;
+import android.os.Build;
import android.os.Environment;
-import android.support.v4.app.ActivityCompat;
+import androidx.core.app.ActivityCompat;
import android.telephony.TelephonyManager;
import android.util.Base64;
import android.util.DisplayMetrics;
@@ -18,10 +19,10 @@ import android.widget.Toast;
import com.alibaba.fastjson.JSON;
import com.kaopiz.kprogresshud.KProgressHUD;
import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache;
+import com.nostra13.universalimageloader.cache.memory.impl.WeakMemoryCache;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.ImageLoader;
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
-import com.nostra13.universalimageloader.core.assist.QueueProcessingType;
import com.yutou.jianr_mg.Application;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Data.MGamePackname;
@@ -56,6 +57,7 @@ import java.util.List;
public class Utils {
private static final String TAG = "Utils";
+ public static boolean isPermissions=false;
public static int getPixelsFromDp(Activity activity, int size) {
DisplayMetrics metrics = new DisplayMetrics();
@@ -82,12 +84,12 @@ public class Utils {
}
public static String getSDCardPath() {
- String path = Environment.getExternalStorageDirectory().getPath() + "/";
+ String path = Application.application.getFilesDir() + "/";
return path;
}
public static String getAppPath() {
- String path = Environment.getExternalStorageDirectory().getPath() + "/jianRMG";
+ String path = Application.application.getFilesDir() + "/jianRMG";
return path;
}
@@ -107,7 +109,6 @@ public class Utils {
if (!cachePath.exists()) {
cachePath.exists();
}
- //builder.memoryCache(new WeakMemoryCache());
builder.diskCache(new UnlimitedDiskCache(cachePath));
builder.defaultDisplayImageOptions(initDisplayOptions());
@@ -216,7 +217,7 @@ public class Utils {
}
}
- public static boolean writerFile(String srcFile, String data) {
+ static boolean writerFile(String srcFile, String data) {
File file = new File(srcFile);
File path = new File(file.getAbsolutePath().split(file.getName())[0]);
if (!path.exists()) {
@@ -234,7 +235,7 @@ public class Utils {
return false;
}
- public static String readFile(String srcFile) {
+ static String readFile(String srcFile) {
File file = new File(srcFile);
if (!file.exists()) {
return null;
@@ -394,6 +395,9 @@ public class Utils {
}
public static String getIMEI() {
+ if( Build.VERSION.SDK_INT>=29){
+ return "android10";
+ }
String imei = "-1";
TelephonyManager telephonyManager = (TelephonyManager) Application.application.getSystemService(Context.TELEPHONY_SERVICE);
if (telephonyManager != null && ActivityCompat.checkSelfPermission(Application.application, Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) {
diff --git a/app/src/main/java/com/yutou/jianr_mg/services/WindowsService.java b/app/src/main/java/com/yutou/jianr_mg/services/WindowsService.java
index c81ca52..6e3375d 100644
--- a/app/src/main/java/com/yutou/jianr_mg/services/WindowsService.java
+++ b/app/src/main/java/com/yutou/jianr_mg/services/WindowsService.java
@@ -13,9 +13,9 @@ import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.provider.Settings;
-import android.support.annotation.Nullable;
-import android.support.annotation.RequiresApi;
-import android.support.constraint.ConstraintLayout;
+import androidx.annotation.Nullable;
+import androidx.annotation.RequiresApi;
+import androidx.constraintlayout.widget.ConstraintLayout;
import android.util.DisplayMetrics;
import android.view.Gravity;
import android.view.KeyEvent;
@@ -32,14 +32,10 @@ import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.SeekBar;
-import android.widget.Toast;
-import com.tencent.smtt.sdk.TbsReaderView;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.R;
import com.yutou.jianr_mg.Tools.ExcelUtils;
-import com.yutou.jianr_mg.Tools.Log;
-import com.yutou.jianr_mg.Tools.RootUtils;
import com.yutou.jianr_mg.Tools.Utils;
import com.yutou.jianr_mg.views.ExcelActivity;
import com.yutou.jianr_mg.views.WarView;
@@ -47,16 +43,11 @@ import com.yutou.jianr_mg.views.WarView;
import org.json.JSONObject;
import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
-import Interfaces.MagicBoxInterface;
-
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
public class WindowsService extends Service {
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/BaseActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/BaseActivity.java
index 13e01a4..3f9db4f 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/BaseActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/BaseActivity.java
@@ -3,7 +3,7 @@ package com.yutou.jianr_mg.views;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.support.v7.app.AppCompatActivity;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.widget.LinearLayout;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/ConfigActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/ConfigActivity.java
index 2721f88..d8573a0 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/ConfigActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/ConfigActivity.java
@@ -1,16 +1,14 @@
package com.yutou.jianr_mg.views;
-import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
import com.yutou.jianr_mg.Application;
-import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Network.HttpApi;
import com.yutou.jianr_mg.R;
import com.yutou.jianr_mg.Tools.JianRUtils;
@@ -65,6 +63,10 @@ public class ConfigActivity extends AppCompatActivity {
Utils.toast(Application.application,"已切换至共存版兼容模式");
}
break;
+ case 6:
+ intent=new Intent(this,WebActivity.class);
+ intent.putExtra("url","http://debugtbs.qq.com");
+ break;
}
if (intent != null) {
startActivity(intent);
@@ -80,5 +82,6 @@ public class ConfigActivity extends AppCompatActivity {
config.add("关于我们");
config.add("开源项目协议");
config.add("切换专用客户端版本");
+ config.add("设置TBS内核");
}
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/DownloadListActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/DownloadListActivity.java
index 7315fb0..6b5b456 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/DownloadListActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/DownloadListActivity.java
@@ -3,8 +3,8 @@ package com.yutou.jianr_mg.views;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.widget.ListView;
import com.alibaba.fastjson.JSON;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/ExcelActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/ExcelActivity.java
index 5351dc5..df1cf33 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/ExcelActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/ExcelActivity.java
@@ -1,14 +1,17 @@
package com.yutou.jianr_mg.views;
+import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
+import android.os.Build;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.constraint.ConstraintLayout;
-import android.support.v7.app.AppCompatActivity;
+import android.view.View;
+
+import androidx.annotation.Nullable;
+import androidx.constraintlayout.widget.ConstraintLayout;
+import androidx.appcompat.app.AppCompatActivity;
import com.kaopiz.kprogresshud.KProgressHUD;
-import com.tencent.smtt.sdk.TbsReaderView;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Interfaces.DownloadFileInerface;
import com.yutou.jianr_mg.Network.HttpUtils;
@@ -56,6 +59,18 @@ public class ExcelActivity extends AppCompatActivity {
ConstraintLayout layout = findViewById(R.id.layout);
layout.addView(excel.getReader(), ConstraintLayout.LayoutParams.MATCH_PARENT, ConstraintLayout.LayoutParams.MATCH_PARENT);
initData();
+ SharedPreferences preferences=getSharedPreferences("config", Context.MODE_PRIVATE);
+ if(Build.VERSION.SDK_INT>=29&&!preferences.getBoolean("exceldialog",false)){
+ MaterialDialog dialog=new MaterialDialog(this);
+ dialog.setTitle("看不到攻略?");
+ dialog.setMessage("如果本页面内容是空的,请前往 个人中心-设置-设置TBS内核-安装线上内核\n成功后手动重启下盒子应该就行了,如果还是没有请再试一次");
+ dialog.setPositiveButton("已经正常", view -> {
+ preferences.edit().putBoolean("exceldialog",true).apply();
+ dialog.dismiss();
+ });
+ dialog.setNegativeButton("下次再说", view -> dialog.dismiss());
+ dialog.show();
+ }
}
SharedPreferences sp;
private void initData() {
@@ -149,6 +164,7 @@ public class ExcelActivity extends AppCompatActivity {
System.out.println(file.getAbsolutePath()+" "+file.exists());
excel.start(file);
setTitle(parame.getString("name")+" by-"+parame.getString("by"));
+ System.out.println("------->"+excel.getReader().getHeight());
}catch (Exception e){
e.printStackTrace();
finish();
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/FavoritesActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/FavoritesActivity.java
index 756aa4a..06c1f2b 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/FavoritesActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/FavoritesActivity.java
@@ -2,9 +2,9 @@ package com.yutou.jianr_mg.views;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.support.v7.widget.GridLayoutManager;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.recyclerview.widget.GridLayoutManager;
import com.alibaba.fastjson.JSON;
import com.umeng.analytics.MobclickAgent;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/GameDataActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/GameDataActivity.java
index f95e6c3..d9f7e1c 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/GameDataActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/GameDataActivity.java
@@ -1,39 +1,32 @@
package com.yutou.jianr_mg.views;
-import android.content.Intent;
import android.os.Bundle;
-import android.os.Environment;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;
-import android.widget.Toast;
import com.kaopiz.kprogresshud.KProgressHUD;
-import com.leon.lfilepickerlibrary.LFilePicker;
import com.qq.e.comm.util.StringUtil;
import com.yutou.jianr_mg.Data.AppData;
-import com.yutou.jianr_mg.Fragments.GameData;
import com.yutou.jianr_mg.Interfaces.DownloadFileInerface;
import com.yutou.jianr_mg.Interfaces.HttpInterface;
import com.yutou.jianr_mg.Network.HttpApi;
import com.yutou.jianr_mg.Network.HttpUtils;
import com.yutou.jianr_mg.Tools.CDNTools;
-import com.yutou.jianr_mg.Tools.RootUtils;
import com.yutou.jianr_mg.Tools.SocketTools;
import com.yutou.jianr_mg.Tools.Utils;
-import org.json.JSONException;
import org.json.JSONObject;
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
-import java.util.List;
import me.drakeet.materialdialog.MaterialDialog;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/HomeHeader.java b/app/src/main/java/com/yutou/jianr_mg/views/HomeHeader.java
index 8658054..1c2f120 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/HomeHeader.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/HomeHeader.java
@@ -174,12 +174,13 @@ public class HomeHeader {
bannerView=new UnifiedBannerView((Activity) context, APPID, POSID, new UnifiedBannerADListener() {
@Override
public void onNoAD(AdError adError) {
- Utils.toast(getContext(),adError.getErrorMsg());
+ // Utils.toast(getContext(),adError.getErrorMsg());
+ Log.e("Banner错误:",adError.getErrorMsg());
}
@Override
public void onADReceive() {
-
+ System.out.println("测试Receive");
}
@Override
@@ -324,24 +325,31 @@ public class HomeHeader {
public View createView(Context context) {
imageView = new ImageView(context);
imageView.setScaleType(ImageView.ScaleType.FIT_XY);
+ LinearLayout.LayoutParams params=new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
+ imageView.setLayoutParams(params);
return imageView;
}
@Override
public void UpdateUI(Context context, int position, final MBanner data) {
- imageLoader.displayImage(data.getUrl(), imageView);
- imageView.setOnClickListener(view -> {
- Intent intent;
- if(data.getClick().startsWith("appWeb")){
- intent = new Intent(getContext(),WebActivity.class);
- intent.putExtra("url",data.getClick().substring(6));
- }else {
- intent = new Intent();
- intent.setAction(Intent.ACTION_VIEW);
- intent.setData(Uri.parse(data.getClick()));
- }
- context.startActivity(intent);
- });
+ try {
+ imageLoader.displayImage(data.getUrl(), imageView);
+ imageView.setOnClickListener(view -> {
+ Intent intent;
+ if(data.getClick().startsWith("appWeb")){
+ intent = new Intent(getContext(),WebActivity.class);
+ intent.putExtra("url",data.getClick().substring(6));
+ }else {
+ intent = new Intent();
+ intent.setAction(Intent.ACTION_VIEW);
+ intent.setData(Uri.parse(data.getClick()));
+ }
+ context.startActivity(intent);
+ });
+ }catch (Exception ignored){
+
+ }
+
}
}
}
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/LicenseActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/LicenseActivity.java
index f23910d..7663648 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/LicenseActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/LicenseActivity.java
@@ -3,10 +3,9 @@ package com.yutou.jianr_mg.views;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.view.View;
-import android.widget.AdapterView;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
import android.widget.ArrayAdapter;
import android.widget.ListView;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/ModActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/ModActivity.java
index bf30fe1..2dc3228 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/ModActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/ModActivity.java
@@ -5,8 +5,8 @@ import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
@@ -143,14 +143,19 @@ public class ModActivity extends AppCompatActivity {
}
private void initData(final TMod tMod) {
- Log.i(TAG,"---------->" + AppData.appConfig.getDownloadhome() + tMod.getImage());
- Log.i(TAG,"---------->" + AppData.appConfig.getDownloadhome() + tMod.getIcon());
- if(StringUtil.isEmpty(tMod.getImage())){
- imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getIcon(), modImage);
- }else {
- imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getImage(), modImage);
+ try {
+ Log.i(TAG,"---------->" + AppData.appConfig.getDownloadhome() + tMod.getImage());
+ Log.i(TAG,"---------->" + AppData.appConfig.getDownloadhome() + tMod.getIcon());
+ if(StringUtil.isEmpty(tMod.getImage())){
+ imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getIcon(), modImage);
+ }else {
+ imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getImage(), modImage);
+ }
+ imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getIcon(), icon);
+ }catch (Exception e){
+ e.printStackTrace();
}
- imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getIcon(), icon);
+
title.setText(tMod.getTitle());
by.setText("@" + tMod.getByuser());
by.setOnClickListener(v -> {
@@ -161,10 +166,15 @@ public class ModActivity extends AppCompatActivity {
//.type(RichType.html)
.into(richText);
downloadText.setTag(0);
- if (ModUtils.getModPath(tMod,"",true).listFiles().length > 0) {
- downloadText.setText("安装");
- downloadText.setTag(2);
+ try {
+ if (ModUtils.getModPath(tMod,"",true).listFiles().length > 0) {
+ downloadText.setText("安装");
+ downloadText.setTag(2);
+ }
+ }catch (Exception e){
+ e.printStackTrace();
}
+
download.setOnClickListener(view -> downloadButtonClick());
collection.setOnClickListener(view -> {
if (Utils.testStringIsNull(AppData.Token)) {
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/ModListActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/ModListActivity.java
index abf115a..279a10b 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/ModListActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/ModListActivity.java
@@ -3,10 +3,10 @@ package com.yutou.jianr_mg.views;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v4.view.ViewPager;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager.widget.ViewPager;
+import androidx.appcompat.app.AppCompatActivity;
import com.alibaba.fastjson.JSON;
import com.umeng.analytics.MobclickAgent;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/NativeAdActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/NativeAdActivity.java
index a8f6d08..b6d95fd 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/NativeAdActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/NativeAdActivity.java
@@ -2,8 +2,8 @@ package com.yutou.jianr_mg.views;
import android.os.Bundle;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/RegisterActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/RegisterActivity.java
index 00ee8d9..e58df15 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/RegisterActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/RegisterActivity.java
@@ -2,8 +2,8 @@ package com.yutou.jianr_mg.views;
import android.content.Intent;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/TestActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/TestActivity.java
index f27b9c0..d6e2b48 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/TestActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/TestActivity.java
@@ -1,8 +1,8 @@
package com.yutou.jianr_mg.views;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.widget.TextView;
public class TestActivity extends AppCompatActivity {
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/UpFeedBack.java b/app/src/main/java/com/yutou/jianr_mg/views/UpFeedBack.java
index 3930749..6dd9293 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/UpFeedBack.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/UpFeedBack.java
@@ -1,12 +1,10 @@
package com.yutou.jianr_mg.views;
-import android.annotation.SuppressLint;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.view.View;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
import android.widget.Button;
-import android.widget.CompoundButton;
import android.widget.Switch;
import android.widget.TextView;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/UserDataActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/UserDataActivity.java
index 7e478ea..3405618 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/UserDataActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/UserDataActivity.java
@@ -4,17 +4,16 @@ import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.text.InputType;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
-import android.widget.Toast;
import com.leon.lfilepickerlibrary.LFilePicker;
-import com.nostra13.universalimageloader.core.ImageLoader;
+import com.yutou.jianr_mg.Application;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Interfaces.HttpInterface;
import com.yutou.jianr_mg.Network.HttpApi;
@@ -138,7 +137,7 @@ public class UserDataActivity extends AppCompatActivity {
new LFilePicker()
.withActivity(UserDataActivity.this)
.withRequestCode(100)
- .withStartPath(Environment.getExternalStorageDirectory().getPath()+"/jianRMG")//指定初始显示路径
+ .withStartPath(Application.application.getFilesDir()+"/jianRMG")//指定初始显示路径
.withIsGreater(false)//过滤文件大小 小于指定大小的文件
.withMutilyMode(false)
.withFileSize(5*1024*1024)//指定文件大小为500K
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/UserDefinedActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/UserDefinedActivity.java
index 8aab873..40e79c6 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/UserDefinedActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/UserDefinedActivity.java
@@ -4,8 +4,8 @@ import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
@@ -15,10 +15,9 @@ import android.widget.Toast;
import com.leon.lfilepickerlibrary.LFilePicker;
import com.umeng.analytics.MobclickAgent;
+import com.yutou.jianr_mg.Application;
import com.yutou.jianr_mg.Data.AppData;
import com.yutou.jianr_mg.Data.MGamePackname;
-import com.yutou.jianr_mg.Data.TMod;
-import com.yutou.jianr_mg.Data.TModfile;
import com.yutou.jianr_mg.Data.TModfilePath;
import com.yutou.jianr_mg.Interfaces.ModInterface;
import com.yutou.jianr_mg.R;
@@ -32,8 +31,6 @@ import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
-import me.drakeet.materialdialog.MaterialDialog;
-
public class UserDefinedActivity extends AppCompatActivity implements View.OnClickListener {
private Button srcFile;
private Spinner outPath;
@@ -105,7 +102,7 @@ public class UserDefinedActivity extends AppCompatActivity implements View.OnCli
new LFilePicker()
.withActivity(this)
.withRequestCode(100)
- .withStartPath(Environment.getExternalStorageDirectory().getPath()+"/jianRMG")//指定初始显示路径
+ .withStartPath(Application.application.getFilesDir()+"/jianRMG")//指定初始显示路径
.withIsGreater(false)//过滤文件大小 小于指定大小的文件
.withMutilyMode(true)
.withFileSize(5*1024*1024)//指定文件大小为500K
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/WarLogActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/WarLogActivity.java
index a6473c9..e7a0044 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/WarLogActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/WarLogActivity.java
@@ -1,12 +1,11 @@
package com.yutou.jianr_mg.views;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
-import android.support.v4.view.ViewPager;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.fragment.app.Fragment;
+import androidx.viewpager.widget.ViewPager;
+import androidx.appcompat.app.AppCompatActivity;
-import com.alibaba.fastjson.JSON;
import com.yutou.jianr_mg.Adapters.ViewPagerAdapter;
import com.yutou.jianr_mg.Data.ShipEquipmnt;
import com.yutou.jianr_mg.Data.TeamData;
@@ -21,9 +20,7 @@ import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
-import java.util.Map;
import me.majiajie.pagerbottomtabstrip.NavigationController;
import me.majiajie.pagerbottomtabstrip.PageNavigationView;
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/WebActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/WebActivity.java
index b6c5952..6493fd2 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/WebActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/WebActivity.java
@@ -1,15 +1,16 @@
package com.yutou.jianr_mg.views;
-import android.net.http.SslError;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
-import android.webkit.SslErrorHandler;
-import android.webkit.WebResourceRequest;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import android.webkit.WebViewClient;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
+
+import com.alibaba.fastjson.JSONObject;
+import com.tencent.smtt.export.external.interfaces.SslErrorHandler;
+import com.tencent.smtt.export.external.interfaces.WebResourceRequest;
+import com.tencent.smtt.sdk.WebSettings;
+import com.tencent.smtt.sdk.WebView;
+import com.tencent.smtt.sdk.WebViewClient;
import com.umeng.analytics.MobclickAgent;
import com.yutou.jianr_mg.R;
import com.yutou.jianr_mg.Tools.Log;
@@ -28,10 +29,21 @@ public class WebActivity extends AppCompatActivity{
initView();
initWeb();
String url=getIntent().getStringExtra("url");
- if(url==null)
- url="http://www.jianrmod.cn";
+ if(url==null) {
+ if(getIntent().getStringExtra("parameter")==null) {
+ url = "http://www.jianrmod.cn";
+ }else{
+ url= JSONObject.parseObject(getIntent().getStringExtra("parameter")).getString("url");
+ }
+ }
Log.i("网页URL",url);
- webView.loadUrl(url);
+ try {
+ webView.loadUrl(url);
+ }catch (Exception e){
+ e.printStackTrace();
+ finish();
+ }
+
}
private void initView(){
webView=findViewById(R.id.webView);
@@ -50,9 +62,9 @@ public class WebActivity extends AppCompatActivity{
}
@Override
- public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
- super.onReceivedSslError(view, handler, error);
- handler.proceed();
+ public void onReceivedSslError(WebView webView, SslErrorHandler sslErrorHandler, com.tencent.smtt.export.external.interfaces.SslError sslError) {
+ super.onReceivedSslError(webView, sslErrorHandler, sslError);
+ sslErrorHandler.proceed();
}
@Override
diff --git a/app/src/main/java/com/yutou/jianr_mg/views/WindowsStartActivity.java b/app/src/main/java/com/yutou/jianr_mg/views/WindowsStartActivity.java
index 3309998..40e3b7b 100644
--- a/app/src/main/java/com/yutou/jianr_mg/views/WindowsStartActivity.java
+++ b/app/src/main/java/com/yutou/jianr_mg/views/WindowsStartActivity.java
@@ -2,8 +2,8 @@ package com.yutou.jianr_mg.views;
import android.content.Intent;
import android.os.Bundle;
-import android.support.annotation.Nullable;
-import android.support.v7.app.AppCompatActivity;
+import androidx.annotation.Nullable;
+import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
diff --git a/app/src/main/res/layout/activity_excel.xml b/app/src/main/res/layout/activity_excel.xml
index 9a456ae..07e88cb 100644
--- a/app/src/main/res/layout/activity_excel.xml
+++ b/app/src/main/res/layout/activity_excel.xml
@@ -1,7 +1,7 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_loading.xml b/app/src/main/res/layout/activity_loading.xml
index ddef1b2..d6d6edf 100644
--- a/app/src/main/res/layout/activity_loading.xml
+++ b/app/src/main/res/layout/activity_loading.xml
@@ -17,7 +17,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
-
@@ -96,5 +96,5 @@
android:textColor="@color/lite_blue"
android:visibility="invisible" />
-
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index a140d36..50c16ce 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -1,12 +1,12 @@
-
-
-
+
diff --git a/app/src/main/res/layout/activity_mod.xml b/app/src/main/res/layout/activity_mod.xml
index 0a54d4c..41cae52 100644
--- a/app/src/main/res/layout/activity_mod.xml
+++ b/app/src/main/res/layout/activity_mod.xml
@@ -1,5 +1,5 @@
-
+ android:layout_height="match_parent"
+ app:layout_constraintBottom_toBottomOf="parent"
+ app:layout_constraintTop_toTopOf="parent">
-
+
@@ -66,23 +71,23 @@
android:id="@+id/tags"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginBottom="8dp"
- android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginBottom="8dp"
android:orientation="horizontal"
app:layout_constraintBottom_toTopOf="@+id/richText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/by"
- app:layout_constraintTop_toBottomOf="@+id/title"/>
+ app:layout_constraintTop_toBottomOf="@+id/title" />
@@ -107,21 +112,21 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/textView"
- />
+ app:layout_constraintTop_toBottomOf="@+id/textView" />
-
-
+
+
+
-
-
+
diff --git a/app/src/main/res/layout/activity_mod_list.xml b/app/src/main/res/layout/activity_mod_list.xml
index 1682405..6e4fc3a 100644
--- a/app/src/main/res/layout/activity_mod_list.xml
+++ b/app/src/main/res/layout/activity_mod_list.xml
@@ -12,7 +12,7 @@
android:elevation="8dp"
/>
-
diff --git a/app/src/main/res/layout/activity_register.xml b/app/src/main/res/layout/activity_register.xml
index 235f1cf..dee2a22 100644
--- a/app/src/main/res/layout/activity_register.xml
+++ b/app/src/main/res/layout/activity_register.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_suspend.xml b/app/src/main/res/layout/activity_suspend.xml
index afcb67f..78e56fa 100644
--- a/app/src/main/res/layout/activity_suspend.xml
+++ b/app/src/main/res/layout/activity_suspend.xml
@@ -1,5 +1,5 @@
-
-
@@ -48,7 +48,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
-
+
@@ -75,4 +75,4 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/contextLayout"
app:layout_constraintTop_toTopOf="parent" />
-
+
diff --git a/app/src/main/res/layout/activity_user_defined.xml b/app/src/main/res/layout/activity_user_defined.xml
index 5fd88ea..175a7ca 100644
--- a/app/src/main/res/layout/activity_user_defined.xml
+++ b/app/src/main/res/layout/activity_user_defined.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_userdata.xml b/app/src/main/res/layout/activity_userdata.xml
index 2f4f411..a99fa39 100644
--- a/app/src/main/res/layout/activity_userdata.xml
+++ b/app/src/main/res/layout/activity_userdata.xml
@@ -1,5 +1,5 @@
-
@@ -7,4 +7,4 @@
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent" />
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_web.xml b/app/src/main/res/layout/activity_web.xml
index 52fa131..c18ca36 100644
--- a/app/src/main/res/layout/activity_web.xml
+++ b/app/src/main/res/layout/activity_web.xml
@@ -2,7 +2,7 @@
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_drop.xml b/app/src/main/res/layout/fragment_drop.xml
index 858615f..a52d99e 100644
--- a/app/src/main/res/layout/fragment_drop.xml
+++ b/app/src/main/res/layout/fragment_drop.xml
@@ -1,5 +1,5 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_game_data.xml b/app/src/main/res/layout/fragment_game_data.xml
index 558e5c6..f319e3b 100644
--- a/app/src/main/res/layout/fragment_game_data.xml
+++ b/app/src/main/res/layout/fragment_game_data.xml
@@ -1,5 +1,5 @@
-
-
-
+
diff --git a/app/src/main/res/layout/fragment_my.xml b/app/src/main/res/layout/fragment_my.xml
index 06c9bb2..42117fb 100644
--- a/app/src/main/res/layout/fragment_my.xml
+++ b/app/src/main/res/layout/fragment_my.xml
@@ -12,7 +12,7 @@
android:scaleType="centerCrop"
app:srcCompat="@mipmap/ic_launcher_round" />
-
@@ -54,7 +54,7 @@
app:layout_constraintStart_toEndOf="@+id/icon"
app:layout_constraintTop_toBottomOf="@+id/uname" />
-
+