2.1发布版
This commit is contained in:
parent
1bd45d7b92
commit
65f12c822c
Binary file not shown.
@ -3,12 +3,12 @@ apply plugin: 'com.android.application'
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
defaultConfig {
|
||||
applicationId "com.yutou.jianrmg_v2"
|
||||
//applicationId "com.yutou.jianr_mg"
|
||||
//applicationId "com.yutou.jianrmg_v2"
|
||||
applicationId "com.yutou.jianr_mg"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 28
|
||||
versionCode 1
|
||||
versionName "0.4α"
|
||||
versionCode 2
|
||||
versionName "2.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
ndk {
|
||||
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
|
||||
@ -77,8 +77,10 @@ dependencies {
|
||||
|
||||
//图片流缓存
|
||||
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
||||
|
||||
//圆形图片
|
||||
implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'
|
||||
|
||||
//滑动Tabs
|
||||
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
|
||||
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar'
|
||||
@ -121,6 +123,7 @@ dependencies {
|
||||
|
||||
//Spinner
|
||||
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'
|
||||
@ -134,10 +137,10 @@ dependencies {
|
||||
implementation 'com.umeng.umsdk:push:5.0.2'
|
||||
|
||||
/* api project(path: ':BaseModel')
|
||||
api project(path: ':GameDataModel')
|
||||
api project(path: ':AppHome')
|
||||
api project(path: ':MgListModel')
|
||||
api project(path: ':ResModl')
|
||||
api project(path: ':UserModel')*/
|
||||
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')
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="com.yutou.jianrmg_v2">
|
||||
package="com.yutou.jianr_mg">
|
||||
|
||||
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
<application
|
||||
android:name=".Application"
|
||||
android:name="com.yutou.jianr_mg.Application"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
android:icon="@mipmap/icon_logo"
|
||||
android:label="@string/app_name"
|
||||
@ -35,10 +35,10 @@
|
||||
android:value="5c4f0bfcf1f556353e000016" />
|
||||
<meta-data
|
||||
android:name="UMENG_CHANNEL"
|
||||
android:value="QQ" />
|
||||
android:value="R" />
|
||||
|
||||
<activity
|
||||
android:name=".LoadingActivity"
|
||||
android:name="com.yutou.jianr_mg.LoadingActivity"
|
||||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
@ -47,30 +47,30 @@
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".MainActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.MainActivity" />
|
||||
|
||||
<service
|
||||
android:name=".services.DownloadService"
|
||||
android:name="com.yutou.jianr_mg.services.DownloadService"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
<service android:name=".services.WindowsService" />
|
||||
<service android:name="com.yutou.jianr_mg.services.WindowsService" />
|
||||
|
||||
<activity
|
||||
android:name=".views.BaseActivity"
|
||||
android:name="com.yutou.jianr_mg.views.BaseActivity"
|
||||
android:theme="@style/AppTheme" />
|
||||
<activity android:name=".views.WebActivity" />
|
||||
<activity android:name=".views.ModListActivity" />
|
||||
<activity android:name=".views.ModActivity" />
|
||||
<activity android:name=".views.DownloadListActivity" />
|
||||
<activity android:name=".views.FavoritesActivity" />
|
||||
<activity android:name=".views.UpFeedBack" />
|
||||
<activity android:name=".views.ConfigActivity" />
|
||||
<activity android:name=".views.UserDefinedActivity" />
|
||||
<activity android:name=".views.LicenseActivity" />
|
||||
<activity android:name=".views.RegisterActivity" />
|
||||
<activity android:name=".views.ExcelActivity" />
|
||||
<activity android:name=".views.TestActivity" />
|
||||
<activity android:name=".views.WindowsStartActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.WebActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.ModListActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.ModActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.DownloadListActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.FavoritesActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.UpFeedBack" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.ConfigActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.UserDefinedActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.LicenseActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.RegisterActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.ExcelActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.TestActivity" />
|
||||
<activity android:name="com.yutou.jianr_mg.views.WindowsStartActivity" />
|
||||
|
||||
<!--广点通-->
|
||||
<service
|
||||
@ -88,10 +88,12 @@
|
||||
android:name="com.qq.e.ads.LandscapeADActivity"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:screenOrientation="landscape" />
|
||||
<activity android:name=".views.WarLogActivity" />
|
||||
|
||||
|
||||
<provider
|
||||
android:name=".Tools.MyFileProvider"
|
||||
android:authorities="com.yutou.jianrmg_v2.fileprovider"
|
||||
android:name="com.yutou.jianr_mg.Tools.MyFileProvider"
|
||||
android:authorities="com.yutou.jianr_mg.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -12,13 +12,13 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Databases.ModDatabase;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.ModActivity;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
import com.yutou.jianr_mg.Databases.ModDatabase;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.ModUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.ModActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters.GameDataAdapters;
|
||||
package com.yutou.jianr_mg.Adapters.GameDataAdapters;
|
||||
|
||||
|
||||
import android.content.Context;
|
||||
@ -10,8 +10,8 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@ -57,7 +57,6 @@ public class DropAdapter extends RecyclerAdapter<Map<String,String>> {
|
||||
loader.displayImage(data.get("icon"),icon);
|
||||
}else{
|
||||
icon.setImageResource(R.mipmap.icon_logo);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.yutou.jianr_mg.Adapters.GameDataAdapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
||||
import cn.lemon.view.adapter.RecyclerAdapter;
|
||||
|
||||
public class WarAdapter extends RecyclerAdapter<List<Map<String, JSONObject>>> {
|
||||
ImageLoader loader;
|
||||
public WarAdapter(Context context) {
|
||||
super(context);
|
||||
loader= Utils.initImageLoader(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseViewHolder<List<Map<String, JSONObject>>> onCreateBaseViewHolder(ViewGroup parent, int viewType) {
|
||||
return new MyHolder(parent, R.layout.item_team);
|
||||
}
|
||||
class MyHolder extends BaseViewHolder<List<Map<String, JSONObject>>>{
|
||||
private ImageView icon;
|
||||
private LinearLayout layout,hpLayout;
|
||||
private TextView name,time;
|
||||
private ProgressBar itemHp;
|
||||
public MyHolder(ViewGroup parent, int layoutId) {
|
||||
super(parent, layoutId);
|
||||
icon=findViewById(R.id.icon);
|
||||
layout=findViewById(R.id.items);
|
||||
hpLayout=findViewById(R.id.hpLayout);
|
||||
name=findViewById(R.id.title);
|
||||
itemHp=findViewById(R.id.itemHp);
|
||||
layout.setVisibility(View.GONE);
|
||||
itemHp.setVisibility(View.GONE);
|
||||
hpLayout.removeAllViews();
|
||||
time=new TextView(getContext());
|
||||
hpLayout.addView(time);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(List<Map<String, JSONObject>> data) {
|
||||
super.setData(data);
|
||||
if(data.size()==0){
|
||||
return;
|
||||
}
|
||||
try {
|
||||
JSONObject warJson=new JSONObject(data.get(0).get("GetWarResult").getString("message"));
|
||||
int level=warJson.getJSONObject("warResult").getInt("resultLevel");
|
||||
String lev="";
|
||||
switch (level){
|
||||
case 1:
|
||||
lev="SS";
|
||||
break;
|
||||
case 2:
|
||||
lev="S";
|
||||
break;
|
||||
case 3:
|
||||
lev="A";
|
||||
break;
|
||||
case 4:
|
||||
lev="B";
|
||||
break;
|
||||
case 5:
|
||||
lev="C";
|
||||
break;
|
||||
case 6:
|
||||
lev="D";
|
||||
break;
|
||||
}
|
||||
JSONObject item=new JSONObject(data.get(0).get("DealNode").getString("message"));
|
||||
name.setText("("+data.get(0).get("data").get("mapId")+")"+item.getJSONObject("warReport").getString("enemyName")+"("+lev+")");
|
||||
time.setText(SimpleDateFormat.getDateTimeInstance(DateFormat.YEAR_FIELD,DateFormat.SHORT).format(new Date(Long.valueOf(data.get(0).get("DealNode").getString("time")))));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemViewClick(List<Map<String, JSONObject>> data) {
|
||||
super.onItemViewClick(data);
|
||||
Utils.toast(getContext(),"详细内容正在咕,敬请期待");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
@ -11,13 +11,13 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Model.HomeCard;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.HomeHeader;
|
||||
import com.yutou.jianrmg_v2.views.ModActivity;
|
||||
import com.yutou.jianrmg_v2.views.WebActivity;
|
||||
import com.yutou.jianr_mg.Model.HomeCard;
|
||||
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.HomeHeader;
|
||||
import com.yutou.jianr_mg.views.ModActivity;
|
||||
import com.yutou.jianr_mg.views.WebActivity;
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
||||
import cn.lemon.view.adapter.RecyclerAdapter;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
@ -15,9 +15,9 @@ import android.widget.TextView;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.nostra13.universalimageloader.core.assist.FailReason;
|
||||
import com.nostra13.universalimageloader.core.listener.ImageLoadingListener;
|
||||
import com.yutou.jianrmg_v2.Data.TeamData;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Data.TeamData;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -136,7 +136,12 @@ public class MagicTeamDataAdapter extends BaseAdapter {
|
||||
}
|
||||
|
||||
public void setData(List<TeamData> enemyTeam) {
|
||||
this.list=enemyTeam;
|
||||
this.list.clear();
|
||||
this.list.addAll(enemyTeam);
|
||||
}
|
||||
|
||||
public List<TeamData> getData() {
|
||||
return this.list;
|
||||
}
|
||||
|
||||
class ItemViews {
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -7,12 +7,12 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MAppTools;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.BaseActivity;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.MAppTools;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.BaseActivity;
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
||||
import cn.lemon.view.adapter.RecyclerAdapter;
|
||||
@ -58,6 +58,7 @@ public class MainUtilsAdapter extends RecyclerAdapter<MAppTools> {
|
||||
String main = data.getMainFunction().split("#")[0];
|
||||
|
||||
try {
|
||||
|
||||
Intent intent=null;
|
||||
if(!type.equals("localActivity")){
|
||||
intent = new Intent(getContext(), Application.application.getClassLoader().loadClass(main));
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -9,12 +9,12 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.BaseActivity;
|
||||
import com.yutou.jianrmg_v2.views.ModListActivity;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.BaseActivity;
|
||||
import com.yutou.jianr_mg.views.ModListActivity;
|
||||
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -11,19 +11,19 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Data.TModtype;
|
||||
import com.yutou.jianrmg_v2.Data.ZsShipType;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Interfaces.ModInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.ModActivity;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
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;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.ModUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.ModActivity;
|
||||
|
||||
import org.angmarch.views.NiceSpinner;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -12,13 +12,13 @@ import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.ConfigActivity;
|
||||
import com.yutou.jianrmg_v2.views.DownloadListActivity;
|
||||
import com.yutou.jianrmg_v2.views.FavoritesActivity;
|
||||
import com.yutou.jianrmg_v2.views.UpFeedBack;
|
||||
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.ConfigActivity;
|
||||
import com.yutou.jianr_mg.views.DownloadListActivity;
|
||||
import com.yutou.jianr_mg.views.FavoritesActivity;
|
||||
import com.yutou.jianr_mg.views.UpFeedBack;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -11,10 +11,10 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.ModActivity;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.ModActivity;
|
||||
|
||||
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
@ -0,0 +1,58 @@
|
||||
package com.yutou.jianr_mg.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
||||
import cn.lemon.view.adapter.RecyclerAdapter;
|
||||
|
||||
public class WarLogAdapter extends RecyclerAdapter<Map> {
|
||||
private ImageLoader loader;
|
||||
public WarLogAdapter(Context context) {
|
||||
super(context);
|
||||
loader= Utils.initImageLoader(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseViewHolder<Map> onCreateBaseViewHolder(ViewGroup parent, int viewType) {
|
||||
return new MyHolder(parent, R.layout.item_team);
|
||||
}
|
||||
class MyHolder extends BaseViewHolder<Map>{
|
||||
TextView title, hp, hpMax;
|
||||
ImageView icon, icon_, item1, item2, item3, item4;
|
||||
ProgressBar hpBar;
|
||||
LinearLayout hpLayout;
|
||||
MyHolder(ViewGroup parent, int layoutId) {
|
||||
super(parent, layoutId);
|
||||
hp =findViewById(R.id.hp);
|
||||
hpMax =findViewById(R.id.hpMax);
|
||||
hpBar =findViewById(R.id.itemHp);
|
||||
title =findViewById(R.id.title);
|
||||
icon =findViewById(R.id.icon);
|
||||
icon_ =findViewById(R.id.icon_);
|
||||
item1 =findViewById(R.id.item1);
|
||||
item2 =findViewById(R.id.item2);
|
||||
item3 =findViewById(R.id.item3);
|
||||
item4 =findViewById(R.id.item4);
|
||||
hpLayout=findViewById(R.id.hpLayout);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setData(Map data) {
|
||||
super.setData(data);
|
||||
JSONObject item= (JSONObject) data.get("");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,26 +1,30 @@
|
||||
package com.yutou.jianrmg_v2;
|
||||
package com.yutou.jianr_mg;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.Notification;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
|
||||
import com.tencent.smtt.sdk.QbSdk;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.umeng.commonsdk.UMConfigure;
|
||||
import com.umeng.message.IUmengCallback;
|
||||
import com.umeng.message.IUmengRegisterCallback;
|
||||
import com.umeng.message.PushAgent;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.User;
|
||||
import com.yutou.jianrmg_v2.Databases.UserDatabase;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.ActivitysManager;
|
||||
import com.yutou.jianrmg_v2.Tools.JianRUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.zzhoujay.richtext.ext.MD5;
|
||||
import com.umeng.message.UmengMessageHandler;
|
||||
import com.umeng.message.entity.UMessage;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.User;
|
||||
import com.yutou.jianr_mg.Databases.UserDatabase;
|
||||
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.ActivitysManager;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
@ -54,34 +58,63 @@ public class Application extends android.app.Application {
|
||||
regActivity();
|
||||
JianRUtils.initShipCardId();
|
||||
|
||||
initUmeng();
|
||||
initTx();
|
||||
|
||||
|
||||
QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
|
||||
@Override
|
||||
public void onCoreInitFinished() {
|
||||
System.out.println("QDSDK初始化失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewInitFinished(boolean b) {
|
||||
Log.e("QDSDK","加载内核是否成功:"+b);
|
||||
}
|
||||
});
|
||||
UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, "c5ec76e4a6ebb1516359792ffee09eb5");
|
||||
MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL);
|
||||
PushAgent.getInstance(this).register(new IUmengRegisterCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
System.out.println("友盟推送注册成功:"+s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
System.out.println("友盟推送注册失败:"+s+"("+s1+")");
|
||||
}
|
||||
});
|
||||
System.out.println("初始化结束");
|
||||
}
|
||||
private void initUmeng(){
|
||||
try {
|
||||
UMConfigure.init(this, UMConfigure.DEVICE_TYPE_PHONE, "c5ec76e4a6ebb1516359792ffee09eb5");
|
||||
MobclickAgent.setScenarioType(this, MobclickAgent.EScenarioType.E_UM_NORMAL);
|
||||
PushAgent pushAgent= PushAgent.getInstance(this);
|
||||
pushAgent.register(new IUmengRegisterCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
System.out.println("友盟推送注册成功:" + s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(String s, String s1) {
|
||||
System.out.println("友盟推送注册失败:" + s + "(" + s1 + ")");
|
||||
}
|
||||
});
|
||||
pushAgent.setMessageHandler(new UmengMessageHandler(){
|
||||
@Override
|
||||
public Notification getNotification(Context context, UMessage uMessage) {
|
||||
for (Map.Entry<String, String> entry : uMessage.extra.entrySet()) {
|
||||
if(entry.getKey().equals("url")){
|
||||
LoadingActivity.url=entry.getValue();
|
||||
}
|
||||
|
||||
}
|
||||
return super.getNotification(context, uMessage);
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
private void initTx(){
|
||||
try {
|
||||
QbSdk.initX5Environment(this, new QbSdk.PreInitCallback() {
|
||||
@Override
|
||||
public void onCoreInitFinished() {
|
||||
System.out.println("QDSDK初始化失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewInitFinished(boolean b) {
|
||||
Log.e("QDSDK","加载内核是否成功:"+b);
|
||||
}
|
||||
});
|
||||
}catch (Exception ignored){
|
||||
}
|
||||
|
||||
}
|
||||
private void initPlugs() {
|
||||
new Thread(() -> {
|
||||
try {
|
||||
@ -106,7 +139,7 @@ public class Application extends android.app.Application {
|
||||
if (!file.getName().contains(".jar")) {
|
||||
continue;
|
||||
}
|
||||
String appid = (String) plugsin.get(file.getName()).loadClass("com.yutou.jianrmg_v2.plugins.Data").getField("appId").get(null);
|
||||
String appid = (String) plugsin.get(file.getName()).loadClass("com.yutou.jianr_mg.plugins.Data").getField("appId").get(null);
|
||||
String md5 = Utils.getFileMD5(file);
|
||||
System.out.println("MD5:" + md5);
|
||||
JSONObject plugs = new JSONObject();
|
||||
@ -212,4 +245,5 @@ public class Application extends android.app.Application {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Handler;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class MAppHome {
|
||||
private int id;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class MAppLicense {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
|
||||
public class MAppMg{
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class MAppTools {
|
||||
private String pluginName;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class MBanner {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class MGamePackname {
|
||||
private boolean isRoot;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class SConfig {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import android.Manifest;
|
||||
import android.content.Context;
|
||||
@ -7,9 +7,9 @@ import android.os.Build;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Tools.RootUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Tools.RootUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class TModfile {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class TModfilePath {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class TModtag {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class UUsercollection {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class UUserdata {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
public class User {
|
||||
private String uname;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Data;
|
||||
package com.yutou.jianr_mg.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,12 +1,12 @@
|
||||
package com.yutou.jianrmg_v2.Databases;
|
||||
package com.yutou.jianr_mg.Databases;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
@ -203,7 +203,13 @@ public class JianRDataDataBase extends SQLiteOpenHelper {
|
||||
writeDatabase.insert(TAB_DATA_NAME, null, values);
|
||||
}
|
||||
}
|
||||
|
||||
public int getTNameId(String name){
|
||||
Cursor cursor=readDatabase.query(TAB_DATA_NAME,new String[]{"*"},"title=?",new String[]{name},null,null,null);
|
||||
if(cursor.moveToNext()){
|
||||
return cursor.getInt(cursor.getColumnIndex("_id"));
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
public long addData(String title, JSONObject data) {
|
||||
if (queryDataName(title) && !queryGameData(Utils.getMD5(data.toString()))) {
|
||||
try {
|
||||
@ -233,7 +239,7 @@ public class JianRDataDataBase extends SQLiteOpenHelper {
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
public List<Map<String,JSONObject>> getData(){
|
||||
public List<Map<String,JSONObject>> getDataList(){
|
||||
List<Map<String,JSONObject>> list=new ArrayList<>();
|
||||
try{
|
||||
Cursor cursor=readDatabase.query(TAB_DATA_GAME,new String[]{"*"},"nodeType=?",new String[]{"DealNode"},null,null,"_id desc");
|
||||
@ -242,8 +248,41 @@ public class JianRDataDataBase extends SQLiteOpenHelper {
|
||||
String m=cursor.getString(cursor.getColumnIndex("m"));
|
||||
String a=cursor.getString(cursor.getColumnIndex("a"));
|
||||
String n=cursor.getString(cursor.getColumnIndex("mapId"));
|
||||
map.put("DealNode",new JSONObject(cursor.getString(cursor.getColumnIndex("src"))));
|
||||
JSONObject node=new JSONObject(cursor.getString(cursor.getColumnIndex("src")));
|
||||
node.put("_id",cursor.getInt(cursor.getColumnIndex("id")));
|
||||
node.put("time",cursor.getString(cursor.getColumnIndex("createTime")));
|
||||
node.put("type",cursor.getString(cursor.getColumnIndex("nodeType")));
|
||||
map.put("DealNode",node);
|
||||
map.put("GetWarResult",getWarResult(m,n,a));
|
||||
JSONObject j=new JSONObject();
|
||||
j.put("mapId",n);
|
||||
map.put("data",j);
|
||||
list.add(map);
|
||||
}
|
||||
cursor.close();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return list;
|
||||
}
|
||||
public List<Map<String,JSONObject>> getDataList(int id){
|
||||
List<Map<String,JSONObject>> list=new ArrayList<>();
|
||||
try{
|
||||
Cursor cursor=readDatabase.rawQuery("select * from t_data_GAME game,t_data_name name,t_data_type type where name._id=? and type._id=name.typeId and game.nameId=name._id",new String[]{id+""});
|
||||
while (cursor.moveToNext()){
|
||||
Map<String,JSONObject> map=new HashMap<>();
|
||||
String m=cursor.getString(cursor.getColumnIndex("m"));
|
||||
String a=cursor.getString(cursor.getColumnIndex("a"));
|
||||
String n=cursor.getString(cursor.getColumnIndex("mapId"));
|
||||
JSONObject node=new JSONObject(cursor.getString(cursor.getColumnIndex("src")));
|
||||
node.put("_id",id);
|
||||
node.put("time",cursor.getString(cursor.getColumnIndex("createTime")));
|
||||
node.put("type",cursor.getString(cursor.getColumnIndex("nodeType")));
|
||||
map.put("DealNode",node);
|
||||
map.put("GetWarResult",getWarResult(m,n,a));
|
||||
JSONObject j=new JSONObject();
|
||||
j.put("mapId",n);
|
||||
map.put("data",j);
|
||||
list.add(map);
|
||||
}
|
||||
cursor.close();
|
||||
@ -260,8 +299,12 @@ public class JianRDataDataBase extends SQLiteOpenHelper {
|
||||
String m=cursor.getString(cursor.getColumnIndex("m"));
|
||||
String a=cursor.getString(cursor.getColumnIndex("a"));
|
||||
String n=cursor.getString(cursor.getColumnIndex("mapId"));
|
||||
map.put("DealNode",new JSONObject(cursor.getString(cursor.getColumnIndex("src"))));
|
||||
JSONObject node=new JSONObject(cursor.getString(cursor.getColumnIndex("src")));
|
||||
node.put("_id",id);
|
||||
node.put("time",cursor.getString(cursor.getColumnIndex("createTime")));
|
||||
map.put("DealNode",node);
|
||||
map.put("GetWarResult",getWarResult(m,n,a));
|
||||
node.put("type",cursor.getString(cursor.getColumnIndex("nodeType")));
|
||||
JSONObject data=new JSONObject();
|
||||
data.put("id",cursor.getInt(cursor.getColumnIndex("_id")));
|
||||
data.put("nameId",cursor.getInt(cursor.getColumnIndex("nameId")));
|
||||
@ -282,6 +325,7 @@ public class JianRDataDataBase extends SQLiteOpenHelper {
|
||||
JSONObject json=null;
|
||||
try{
|
||||
Cursor cursor=readDatabase.query(TAB_DATA_GAME,new String[]{"*"},"mapId=? and m=? and a=?",new String[]{n,m,a},null,null,null);
|
||||
cursor.moveToNext();
|
||||
if(cursor.moveToNext()){
|
||||
json=new JSONObject(cursor.getString(cursor.getColumnIndex("src")));
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
package com.yutou.jianrmg_v2.Databases;
|
||||
package com.yutou.jianr_mg.Databases;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Data.MGamePackname;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,10 +1,10 @@
|
||||
package com.yutou.jianrmg_v2.Databases;
|
||||
package com.yutou.jianr_mg.Databases;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
|
||||
public class PlugDatabase extends SQLiteOpenHelper {
|
||||
private static PlugDatabase database;
|
@ -1,12 +1,12 @@
|
||||
package com.yutou.jianrmg_v2.Databases;
|
||||
package com.yutou.jianr_mg.Databases;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.User;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Data.User;
|
||||
|
||||
public class UserDatabase extends SQLiteOpenHelper {
|
||||
private static UserDatabase database;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
@ -15,10 +15,10 @@ 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.jianrmg_v2.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianrmg_v2.Fragments.GameDataFragments.DropFragment;
|
||||
import com.yutou.jianrmg_v2.Fragments.GameDataFragments.WarFragment;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianr_mg.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianr_mg.Fragments.GameDataFragments.DropFragment;
|
||||
import com.yutou.jianr_mg.Fragments.GameDataFragments.WarFragment;
|
||||
import com.yutou.jianr_mg.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments.GameDataFragments;
|
||||
package com.yutou.jianr_mg.Fragments.GameDataFragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -13,19 +13,21 @@ import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
import com.yutou.jianrmg_v2.Adapters.GameDataAdapters.DropAdapter;
|
||||
import com.yutou.jianrmg_v2.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Adapters.GameDataAdapters.DropAdapter;
|
||||
import com.yutou.jianr_mg.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
|
||||
import org.angmarch.views.NiceSpinner;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
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;
|
||||
|
||||
@ -88,19 +90,28 @@ public class DropFragment extends Fragment {
|
||||
}
|
||||
|
||||
private List<String> srcTypes;
|
||||
private ArrayAdapter srcAdapter,typeAdapter;
|
||||
|
||||
private void initData() {
|
||||
try {
|
||||
srcTypes = database.getTypes();
|
||||
if(srcTypes.size()==0){
|
||||
srcTypes.add("无参数");
|
||||
|
||||
}
|
||||
src.setAdapter(new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, srcTypes));
|
||||
if(srcAdapter==null){
|
||||
srcAdapter=new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, srcTypes);
|
||||
}
|
||||
if(typeAdapter==null){
|
||||
typeAdapter=new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, database.getNames(srcTypes.get(0)));
|
||||
}
|
||||
src.setAdapter(srcAdapter);
|
||||
src.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
type.setAdapter(new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, database.getNames(srcTypes.get(i))));
|
||||
|
||||
typeAdapter.clear();
|
||||
typeAdapter.addAll(database.getNames(srcTypes.get(i)));
|
||||
typeAdapter.notifyDataSetChanged();
|
||||
getData(type.getSelectedIndex());
|
||||
}
|
||||
|
||||
@ -114,7 +125,9 @@ public class DropFragment extends Fragment {
|
||||
if(types.size()==0){
|
||||
types.add("无参数");
|
||||
}
|
||||
type.setAdapter(new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item,types));
|
||||
typeAdapter.clear();
|
||||
typeAdapter.addAll(types);
|
||||
type.setAdapter(typeAdapter);
|
||||
type.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
@ -126,6 +139,8 @@ public class DropFragment extends Fragment {
|
||||
|
||||
}
|
||||
});
|
||||
type.setSelectedIndex(0);
|
||||
typeAdapter.notifyDataSetChanged();
|
||||
getData(0);
|
||||
|
||||
} catch (Exception e) {
|
||||
@ -135,6 +150,9 @@ public class DropFragment extends Fragment {
|
||||
|
||||
private void getData(int i) {
|
||||
try {
|
||||
if(srcTypes.size()==0){
|
||||
return;
|
||||
}
|
||||
String name = database.getNames(srcTypes.get(src.getSelectedIndex())).get(i);
|
||||
List<JSONObject> list = database.getDrops(name);
|
||||
List<Map<String, String>> ldata = new ArrayList<>();
|
||||
@ -144,9 +162,11 @@ public class DropFragment extends Fragment {
|
||||
String title = json.getString("title");
|
||||
map.put("icon", "http://jianr.jianrmod.cn/jianr/ship/S_NORMAL_" + JianRUtils.jianCidToid(cid) + ".png");
|
||||
map.put("name", title);
|
||||
map.put("time", new SimpleDateFormat("yyyy年MM月dd hh:mm:ss")
|
||||
.format(new Date(Long.valueOf(json.getJSONObject("data").getString("createTime")))));
|
||||
/* map.put("time", new SimpleDateFormat("yyyy年MM月dd HH:mm:ss")
|
||||
.format(new Date(Long.valueOf(json.getJSONObject("data").getString("createTime")))));*/
|
||||
map.put("time",SimpleDateFormat.getDateTimeInstance(DateFormat.YEAR_FIELD,DateFormat.SHORT).format(new Date(Long.valueOf(json.getJSONObject("data").getString("createTime")))));
|
||||
ldata.add(map);
|
||||
|
||||
}
|
||||
Collections.reverse(ldata);
|
||||
adapter.clear();
|
@ -0,0 +1,208 @@
|
||||
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 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.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.angmarch.views.NiceSpinner;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import cn.lemon.view.RefreshRecyclerView;
|
||||
|
||||
public class WarFragment extends Fragment {
|
||||
private static WarFragment fragment;
|
||||
private View view;
|
||||
private NiceSpinner src, type;
|
||||
private JianRDataDataBase database;
|
||||
private RefreshRecyclerView recyclerView;
|
||||
private WarAdapter adapter;
|
||||
private List<Map<String, JSONObject>> srcList;
|
||||
private List<List<Map<String, JSONObject>>> data;
|
||||
private Map<String, List<JSONObject>> map;
|
||||
|
||||
public static WarFragment init() {
|
||||
if (fragment == null) {
|
||||
fragment = new WarFragment();
|
||||
fragment.map = new HashMap<>();
|
||||
fragment.srcList = new ArrayList<>();
|
||||
fragment.database = JianRDataDataBase.init();
|
||||
}
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
if (view != null) {
|
||||
return view;
|
||||
}
|
||||
view = inflater.inflate(R.layout.fragment_drop, null);
|
||||
data = new ArrayList<>();
|
||||
|
||||
System.out.println("当前模式下的战斗数据:" + srcList.size());
|
||||
initView();
|
||||
return view;
|
||||
}
|
||||
|
||||
public void initView() {
|
||||
src = view.findViewById(R.id.src);
|
||||
type = view.findViewById(R.id.type);
|
||||
recyclerView = view.findViewById(R.id.recyclerView);
|
||||
recyclerView.setSwipeRefreshColors(0xFF437845, 0xFFE44F98, 0xFF2FAC21);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
adapter = new WarAdapter(getContext());
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.dismissSwipeRefresh();
|
||||
recyclerView.addRefreshAction(() -> {
|
||||
try {
|
||||
src.setSelectedIndex(0);
|
||||
type.setSelectedIndex(0);
|
||||
initData();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
initSpinner();
|
||||
|
||||
}
|
||||
private List<String> srcTypes;
|
||||
private ArrayAdapter srcAdapter,typeAdapter;
|
||||
private void initSpinner() {
|
||||
try {
|
||||
srcTypes = database.getTypes();
|
||||
if(srcTypes.size()==0){
|
||||
srcTypes.add("无参数");
|
||||
}
|
||||
if(srcAdapter==null){
|
||||
srcAdapter=new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item, srcTypes);
|
||||
}
|
||||
if(typeAdapter==null){
|
||||
typeAdapter=new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_item, database.getNames(srcTypes.get(0)));
|
||||
}
|
||||
src.setAdapter(srcAdapter);
|
||||
src.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
typeAdapter.clear();
|
||||
typeAdapter.addAll(database.getNames(srcTypes.get(i)));
|
||||
typeAdapter.notifyDataSetChanged();
|
||||
initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
src.setSelectedIndex(0);
|
||||
|
||||
List<String> types=database.getNames(srcTypes.get(0));
|
||||
if(types.size()==0){
|
||||
types.add("无参数");
|
||||
}
|
||||
typeAdapter.clear();
|
||||
typeAdapter.addAll(types);
|
||||
type.setAdapter(typeAdapter);
|
||||
type.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
||||
@Override
|
||||
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
initData();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNothingSelected(AdapterView<?> adapterView) {
|
||||
|
||||
}
|
||||
});
|
||||
typeAdapter.notifyDataSetChanged();
|
||||
type.setSelectedIndex(0);
|
||||
|
||||
srcList = new ArrayList<>();
|
||||
initData();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
private void initData() {
|
||||
try {
|
||||
data.clear();
|
||||
srcList = database.getDataList(database.getTNameId((String) typeAdapter.getItem(type.getSelectedIndex())));
|
||||
for (int i = 0; i < srcList.size(); i++) {
|
||||
Map<String, JSONObject> maps = srcList.get(i);
|
||||
JSONObject item = maps.get("data");
|
||||
if(maps.get("DealNode").getString("time").contains("2430")){
|
||||
System.out.println("此时正是430");
|
||||
}
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
if(item.getInt("mapId")==999202){
|
||||
System.out.println("找到活动地图");
|
||||
}
|
||||
if(Objects.requireNonNull(maps.get("DealNode")).getString("type").equals("DealNode")) {
|
||||
if (item.getInt("mapId") % 10 == 2) {
|
||||
getItem(i, srcList);
|
||||
}
|
||||
}
|
||||
}
|
||||
adapter.clear();
|
||||
adapter.addAll(data);
|
||||
adapter.notifyDataSetChanged();
|
||||
recyclerView.dismissSwipeRefresh();
|
||||
recyclerView.showNoMore();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void getItem(int index, List<Map<String, JSONObject>> srcList) {
|
||||
List<Map<String,JSONObject>> list = new ArrayList<>();
|
||||
try {
|
||||
for (int i = index; i < srcList.size(); i++) {
|
||||
Map<String, JSONObject> maps = srcList.get(i);
|
||||
JSONObject item = maps.get("data");
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
if (Objects.requireNonNull(maps.get("DealNode")).getString("type").equals("DealNode")) {
|
||||
|
||||
if (item.getInt("mapId") % 10 == 2&&i>index) {
|
||||
saveData(list);
|
||||
return;
|
||||
}else{
|
||||
list.add(srcList.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
saveData(list);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void saveData(List<Map<String, JSONObject>> list) {
|
||||
if (list.size() > 0)
|
||||
data.add(list);
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -14,15 +14,15 @@ import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Adapters.HomeRecyclerAdapter;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Model.HomeCard;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.HomeHeader;
|
||||
import com.yutou.jianr_mg.Adapters.HomeRecyclerAdapter;
|
||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||
import com.yutou.jianr_mg.Model.HomeCard;
|
||||
import com.yutou.jianr_mg.Network.HttpApi;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
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.HomeHeader;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -13,14 +13,14 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianrmg_v2.Adapters.ModListRecyclerAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Adapters.ModListRecyclerAdapter;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -12,15 +12,15 @@ import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianrmg_v2.Adapters.ModRecyclerAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Adapters.ModRecyclerAdapter;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
@ -7,8 +7,8 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/25.
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
@ -7,8 +7,8 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/25.
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
@ -7,8 +7,8 @@ import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/25.
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -17,14 +17,14 @@ import android.widget.Toast;
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Adapters.MyItemGridViewAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.UUserdata;
|
||||
import com.yutou.jianrmg_v2.Data.User;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
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 java.util.ArrayList;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
@ -17,8 +17,8 @@ import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.services.DownloadService;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.services.DownloadService;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/21.
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Fragments;
|
||||
package com.yutou.jianr_mg.Fragments;
|
||||
|
||||
|
||||
import android.os.Bundle;
|
||||
@ -12,13 +12,13 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianrmg_v2.Adapters.MainUtilsAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MAppTools;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianr_mg.Adapters.MainUtilsAdapter;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.MAppTools;
|
||||
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.R;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -113,7 +113,7 @@ public class UtilsFragments extends Fragment {
|
||||
while (iterator.hasNext()){
|
||||
String key= (String) iterator.next();
|
||||
if(map.containsKey(key)){
|
||||
Class plugins=map.get(key).loadClass("com.yutou.jianrmg_v2.plugins.Data");
|
||||
Class plugins=map.get(key).loadClass("com.yutou.jianr_mg.plugins.Data");
|
||||
MAppTools tools=new MAppTools();
|
||||
tools.setName((String) plugins.getField("title").get(null));
|
||||
tools.setPluginName((String) plugins.getField("name").get(null));
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Interfaces;
|
||||
package com.yutou.jianr_mg.Interfaces;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/5.
|
@ -1,7 +1,7 @@
|
||||
package com.yutou.jianrmg_v2.Interfaces;
|
||||
package com.yutou.jianr_mg.Interfaces;
|
||||
|
||||
|
||||
import com.yutou.jianrmg_v2.Data.TModfile;
|
||||
import com.yutou.jianr_mg.Data.TModfile;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/2.
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Interfaces;
|
||||
package com.yutou.jianr_mg.Interfaces;
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Interfaces;
|
||||
package com.yutou.jianr_mg.Interfaces;
|
||||
|
||||
public interface ModInterface {
|
||||
void onAction(boolean flag,int type);
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2;
|
||||
package com.yutou.jianr_mg;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
@ -29,22 +29,23 @@ 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.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.Data.SConfig;
|
||||
import com.yutou.jianrmg_v2.Data.UUserdata;
|
||||
import com.yutou.jianrmg_v2.Data.User;
|
||||
import com.yutou.jianrmg_v2.Databases.UserDatabase;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.ActivitysManager;
|
||||
import com.yutou.jianrmg_v2.Tools.AppPermissions;
|
||||
import com.yutou.jianrmg_v2.Tools.ConfigUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.RegisterActivity;
|
||||
import com.yutou.jianrmg_v2.views.WebActivity;
|
||||
import com.umeng.message.UmengMessageHandler;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.MGamePackname;
|
||||
import com.yutou.jianr_mg.Data.SConfig;
|
||||
import com.yutou.jianr_mg.Data.UUserdata;
|
||||
import com.yutou.jianr_mg.Data.User;
|
||||
import com.yutou.jianr_mg.Databases.UserDatabase;
|
||||
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.ActivitysManager;
|
||||
import com.yutou.jianr_mg.Tools.AppPermissions;
|
||||
import com.yutou.jianr_mg.Tools.ConfigUtils;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.RegisterActivity;
|
||||
import com.yutou.jianr_mg.views.WebActivity;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -58,8 +59,9 @@ import me.drakeet.materialdialog.MaterialDialog;
|
||||
*/
|
||||
|
||||
public class LoadingActivity extends AppCompatActivity {
|
||||
private static final String APPID = "1105364182";
|
||||
private static final String POSID = "4070960054673794";
|
||||
private static final String APPID = "1105310947";
|
||||
private static final String POSID = "7090537892072921";
|
||||
public static String url=null;
|
||||
|
||||
private LinearLayout loginLayout,adLayout;
|
||||
private Button login, reg;
|
||||
@ -67,6 +69,7 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
private ImageView icon;
|
||||
private Handler handler;
|
||||
private boolean isLogin=false;
|
||||
private Class clazz;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
@ -75,10 +78,16 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
WindowManager.LayoutParams. FLAG_FULLSCREEN);
|
||||
setContentView(R.layout.activity_loading);
|
||||
Utils.setImmersion(this);
|
||||
if(url==null){
|
||||
clazz=MainActivity.class;
|
||||
}else{
|
||||
clazz=WebActivity.class;
|
||||
}
|
||||
handler = new Handler();
|
||||
initViews();
|
||||
initData();
|
||||
startOpenAd();
|
||||
|
||||
}
|
||||
|
||||
private void login(String name, String pass) {
|
||||
@ -212,6 +221,7 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
public void httpGetData(String string, int code) {
|
||||
try {
|
||||
JSONObject json = new JSONObject(string);
|
||||
Log.i("LOGIN","登录状态:"+string);
|
||||
if (json.getInt("code") == 100) {
|
||||
JSONObject data = json.getJSONObject("data").getJSONObject("data");
|
||||
AppData.user = JSON.parseObject(data.getJSONObject("user").toString(), User.class);
|
||||
@ -304,8 +314,12 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
dialog.setNegativeButton("放弃",v -> {
|
||||
dialog.dismiss();
|
||||
if(isLogin) {
|
||||
Intent intent = new Intent(LoadingActivity.this, MainActivity.class);
|
||||
Intent intent = new Intent(LoadingActivity.this, clazz);
|
||||
if(url!=null){
|
||||
intent.putExtra("url",url);
|
||||
}
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}else{
|
||||
Utils.toast(this,"未登录/登录信息失效");
|
||||
showLogin();
|
||||
@ -323,8 +337,12 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
|
||||
}else{
|
||||
if(isLogin) {
|
||||
Intent intent = new Intent(LoadingActivity.this, MainActivity.class);
|
||||
Intent intent = new Intent(LoadingActivity.this, clazz);
|
||||
if(url!=null){
|
||||
intent.putExtra("url",url);
|
||||
}
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}else{
|
||||
Utils.toast(this,"未登录/登录信息失效");
|
||||
showLogin();
|
||||
@ -370,11 +388,7 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
Log.i(readys + "");
|
||||
if (readys == 4) {
|
||||
handler.postDelayed(() -> {
|
||||
/*if (Utils.testStringIsNull(AppData.Token)) {
|
||||
showLogin();
|
||||
} else {
|
||||
start();
|
||||
}*/
|
||||
|
||||
|
||||
}, 0);
|
||||
}
|
||||
@ -419,7 +433,7 @@ public class LoadingActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
public void onNoAD(AdError adError) {
|
||||
start();
|
||||
handler.postDelayed(()->start(),3000);
|
||||
}
|
||||
|
||||
@Override
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2;
|
||||
package com.yutou.jianr_mg;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -9,14 +9,14 @@ import android.view.KeyEvent;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Fragments.GameData;
|
||||
import com.yutou.jianrmg_v2.Fragments.Home;
|
||||
import com.yutou.jianrmg_v2.Fragments.MGList;
|
||||
import com.yutou.jianrmg_v2.Fragments.My;
|
||||
import com.yutou.jianrmg_v2.Fragments.UtilsFragments;
|
||||
import com.yutou.jianrmg_v2.Tools.ActivitysManager;
|
||||
import com.yutou.jianr_mg.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Fragments.GameData;
|
||||
import com.yutou.jianr_mg.Fragments.Home;
|
||||
import com.yutou.jianr_mg.Fragments.MGList;
|
||||
import com.yutou.jianr_mg.Fragments.My;
|
||||
import com.yutou.jianr_mg.Fragments.UtilsFragments;
|
||||
import com.yutou.jianr_mg.Tools.ActivitysManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Model;
|
||||
package com.yutou.jianr_mg.Model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Network;
|
||||
package com.yutou.jianr_mg.Network;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
@ -8,6 +8,7 @@ public class HttpApi {
|
||||
public static final String HOME="http://jianr.jianrmod.cn/";
|
||||
//public static final String HOME = "http://192.168.31.241: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_URL=HOME+"android/"; //服务器
|
||||
|
||||
public static final String MOD_ALL = "mod/all.do";
|
@ -1,11 +1,11 @@
|
||||
package com.yutou.jianrmg_v2.Network;
|
||||
package com.yutou.jianr_mg.Network;
|
||||
|
||||
|
||||
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.Manifest;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
@ -1,6 +1,6 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
@ -12,18 +12,18 @@ import android.widget.Toast;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Data.TModfile;
|
||||
import com.yutou.jianrmg_v2.Databases.ModDatabase;
|
||||
import com.yutou.jianrmg_v2.Interfaces.DownloadInterface;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Interfaces.ModInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.services.DownloadService;
|
||||
import com.yutou.jianrmg_v2.services.MagicBoxService;
|
||||
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.Databases.ModDatabase;
|
||||
import com.yutou.jianr_mg.Interfaces.DownloadInterface;
|
||||
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.services.DownloadService;
|
||||
import com.yutou.jianr_mg.services.MagicBoxService;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.support.v4.content.FileProvider;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
@ -6,8 +6,8 @@ import android.view.View;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
@ -36,7 +36,7 @@ public class RootUtils {
|
||||
if (rootUtils == null) {
|
||||
rootUtils = new RootUtils(context);
|
||||
rootUtils.init();
|
||||
rootUtils.println("chmod 7777 /data/data/com.yutou.jianrmg_v2/files/busybox");
|
||||
rootUtils.println("chmod 7777 /data/data/com.yutou.jianr_mg/files/busybox");
|
||||
}
|
||||
return rootUtils;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.Tools;
|
||||
package com.yutou.jianr_mg.Tools;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -17,15 +17,15 @@ 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.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.Data.TModfilePath;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.views.WebActivity;
|
||||
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.TModfilePath;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.views.WebActivity;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.services;
|
||||
package com.yutou.jianr_mg.services;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
@ -14,14 +14,14 @@ import android.os.Build;
|
||||
import android.os.IBinder;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.TModfile;
|
||||
import com.yutou.jianrmg_v2.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianrmg_v2.Interfaces.DownloadInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.TModfile;
|
||||
import com.yutou.jianr_mg.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianr_mg.Interfaces.DownloadInterface;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.services;
|
||||
package com.yutou.jianr_mg.services;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
@ -7,16 +7,18 @@ import android.os.IBinder;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.bigzhao.jianrmagicbox.aidl.IMagicBoxBinder;
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.WarView;
|
||||
import com.yutou.jianr_mg.Application;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.views.WarView;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
@ -121,17 +123,24 @@ public class MagicBoxService {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
JSONObject json=new JSONObject(),json2=new JSONObject();
|
||||
if(str!=null){
|
||||
json=new JSONObject(str);
|
||||
json.put("type","DealNode");
|
||||
|
||||
}
|
||||
if(str2!=null){
|
||||
json2=new JSONObject(str2);
|
||||
json2.put("type","GetWarResult");
|
||||
}
|
||||
if(listener!=null){
|
||||
JSONObject json;
|
||||
if(str!=null){
|
||||
json=new JSONObject(str);
|
||||
json.put("type","DealNode");
|
||||
listener.getData(json.toString());
|
||||
}
|
||||
if(str2!=null){
|
||||
json=new JSONObject(str2);
|
||||
json.put("type","GetWarResult");
|
||||
listener.getData(json.toString());
|
||||
listener.getData(json.toString());
|
||||
listener.getData(json2.toString());
|
||||
}
|
||||
if(interfaces!=null){
|
||||
for (MagicBoxInterface boxInterface : interfaces) {
|
||||
boxInterface.getData(json.toString());
|
||||
boxInterface.getData(json2.toString());
|
||||
}
|
||||
}
|
||||
// System.out.println("str = "+str);
|
||||
@ -177,6 +186,14 @@ public class MagicBoxService {
|
||||
this.order = order;
|
||||
this.magicBoxInterface = boxInterface;
|
||||
}
|
||||
private List<MagicBoxInterface> interfaces;
|
||||
public void addInterface(MagicBoxInterface magicBoxInterface){
|
||||
if(interfaces==null){
|
||||
interfaces=new ArrayList<>();
|
||||
}
|
||||
interfaces.add(magicBoxInterface);
|
||||
|
||||
}
|
||||
|
||||
public void clearOrder() {
|
||||
order = null;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.services;
|
||||
package com.yutou.jianr_mg.services;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
@ -32,16 +32,17 @@ 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.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ExcelUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.RootUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.ExcelActivity;
|
||||
import com.yutou.jianrmg_v2.views.WarView;
|
||||
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;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -363,7 +364,7 @@ public class WindowsService extends Service {
|
||||
|
||||
private List<Button> getMagicButtons() {
|
||||
List<Button> list = new ArrayList<>();
|
||||
if (MagicBoxService.init() != null) {
|
||||
if (MagicBoxService.init() != null||true) {
|
||||
Button map = new Button(context);
|
||||
Button user = new Button(context);
|
||||
Button pool = new Button(context);
|
||||
@ -402,7 +403,7 @@ public class WindowsService extends Service {
|
||||
list.add(build);
|
||||
//list.add(develop);
|
||||
//list.add(expedition);
|
||||
list.add(fix);
|
||||
//list.add(fix);
|
||||
|
||||
}
|
||||
return list;
|
||||
@ -469,34 +470,40 @@ public class WindowsService extends Service {
|
||||
|
||||
switch ((int) view.getTag()) {
|
||||
case 300:
|
||||
SeekBar bar = new SeekBar(context);
|
||||
bar.setMin(1);
|
||||
bar.setMax(230);
|
||||
bar.setProgress((int) params.alpha);
|
||||
bar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
|
||||
System.out.println("参数:" + i);
|
||||
params.alpha = i;
|
||||
windowManager.updateViewLayout(mainLayout, params);
|
||||
}
|
||||
try {
|
||||
SeekBar bar = new SeekBar(context);
|
||||
bar.setMin(1);
|
||||
bar.setMax(230);
|
||||
bar.setProgress((int) params.alpha);
|
||||
bar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
|
||||
@Override
|
||||
public void onProgressChanged(SeekBar seekBar, int i, boolean b) {
|
||||
System.out.println("参数:" + i);
|
||||
params.alpha = i;
|
||||
windowManager.updateViewLayout(mainLayout, params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
@Override
|
||||
public void onStartTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
@Override
|
||||
public void onStopTrackingTouch(SeekBar seekBar) {
|
||||
|
||||
}
|
||||
});
|
||||
dialog = new AlertDialog.Builder(context)
|
||||
.setTitle("设置透明度")
|
||||
.setView(bar)
|
||||
.setPositiveButton("确定", (dialogInterface, i) -> dialogInterface.dismiss()).create();
|
||||
dialog.getWindow().setType(params.type);
|
||||
dialog.show();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
Utils.toast(context,"可能您的设备不支持调节透明度");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
dialog = new AlertDialog.Builder(context)
|
||||
.setTitle("设置透明度")
|
||||
.setView(bar)
|
||||
.setPositiveButton("确定", (dialogInterface, i) -> dialogInterface.dismiss()).create();
|
||||
dialog.getWindow().setType(params.type);
|
||||
dialog.show();
|
||||
break;
|
||||
case 301:
|
||||
timer.cancel();
|
||||
@ -630,12 +637,4 @@ public class WindowsService extends Service {
|
||||
contextLayout.removeAllViews();
|
||||
contextLayout.addView(view);
|
||||
}
|
||||
private View getUserTeam(JSONObject json){
|
||||
try {
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -10,12 +10,12 @@ import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.yutou.jianrmg_v2.Application;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
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.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import Interfaces.BaseActivityInterface;
|
||||
import dalvik.system.DexClassLoader;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -9,10 +9,10 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.RootUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Network.HttpApi;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.RootUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
@ -9,14 +9,14 @@ import android.widget.ListView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Adapters.DownloadItemAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Databases.ModDatabase;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianr_mg.Adapters.DownloadItemAdapter;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
import com.yutou.jianr_mg.Databases.ModDatabase;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.ModUtils;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
@ -9,12 +9,12 @@ import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.tencent.smtt.sdk.TbsReaderView;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ExcelUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.ExcelUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
@ -8,14 +8,14 @@ import android.support.v7.widget.GridLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Adapters.ModRecyclerAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Adapters.ModRecyclerAdapter;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -19,15 +19,15 @@ import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.qq.e.ads.banner2.UnifiedBannerADListener;
|
||||
import com.qq.e.ads.banner2.UnifiedBannerView;
|
||||
import com.qq.e.comm.util.AdError;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MAppHomeConfig;
|
||||
import com.yutou.jianrmg_v2.Data.MBanner;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.MAppHomeConfig;
|
||||
import com.yutou.jianr_mg.Data.MBanner;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
@ -42,7 +42,7 @@ import java.util.TimerTask;
|
||||
|
||||
public class HomeHeader {
|
||||
private static final String APPID = "1105364182";
|
||||
private static final String POSID = "7040360034176735";
|
||||
private static final String POSID = "1030169024275783";
|
||||
private static HomeHeader header;
|
||||
private MAppHomeConfig homeConfig;
|
||||
private ConvenientBanner banner;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -12,10 +12,10 @@ import android.widget.ListView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Data.MAppLicense;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.Data.MAppLicense;
|
||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||
import com.yutou.jianr_mg.Network.HttpApi;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
@ -17,18 +17,19 @@ import android.widget.TextView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.qq.e.comm.util.StringUtil;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Adapters.ReModListAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Data.TModtag;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Adapters.ReModListAdapter;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.TMod;
|
||||
import com.yutou.jianr_mg.Data.TModtag;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
import com.yutou.jianr_mg.Tools.ModUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.zzhoujay.richtext.RichText;
|
||||
import com.zzhoujay.richtext.ig.DefaultImageGetter;
|
||||
|
||||
@ -144,10 +145,17 @@ 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());
|
||||
imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getImage(), modImage);
|
||||
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);
|
||||
title.setText(tMod.getTitle());
|
||||
by.setText("@" + tMod.getByuser());
|
||||
by.setOnClickListener(v -> {
|
||||
|
||||
});
|
||||
RichText.fromHtml(tMod.getInfo())
|
||||
.imageGetter(new DefaultImageGetter())
|
||||
//.type(RichType.html)
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
@ -10,13 +10,13 @@ import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.MAppMg;
|
||||
import com.yutou.jianrmg_v2.Fragments.ModListFragment_0;
|
||||
import com.yutou.jianrmg_v2.Fragments.ModListFragment_1;
|
||||
import com.yutou.jianrmg_v2.Fragments.ModListFragment_2;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianr_mg.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianr_mg.Data.MAppMg;
|
||||
import com.yutou.jianr_mg.Fragments.ModListFragment_0;
|
||||
import com.yutou.jianr_mg.Fragments.ModListFragment_1;
|
||||
import com.yutou.jianr_mg.Fragments.ModListFragment_2;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -13,13 +13,13 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.LoadingActivity;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ActivitysManager;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Interfaces.HttpInterface;
|
||||
import com.yutou.jianr_mg.LoadingActivity;
|
||||
import com.yutou.jianr_mg.Network.HttpApi;
|
||||
import com.yutou.jianr_mg.Network.HttpUtils;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.ActivitysManager;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
@ -29,6 +29,7 @@ public class RegisterActivity extends AppCompatActivity implements View.OnClickL
|
||||
private EditText editText2;
|
||||
private EditText password;
|
||||
private EditText rePassword;
|
||||
private EditText email;
|
||||
private Button login;
|
||||
private Button register;
|
||||
private ImageView ovo;
|
||||
@ -49,6 +50,7 @@ public class RegisterActivity extends AppCompatActivity implements View.OnClickL
|
||||
login = findViewById(R.id.login);
|
||||
register = findViewById(R.id.register);
|
||||
ovo = findViewById(R.id.ovo);
|
||||
email = findViewById(R.id.email);
|
||||
|
||||
|
||||
login.setOnClickListener(this);
|
||||
@ -69,6 +71,7 @@ public class RegisterActivity extends AppCompatActivity implements View.OnClickL
|
||||
json.put("uname",userName.getText().toString());
|
||||
json.put("name",editText2.getText().toString());
|
||||
json.put("pass",password.getText().toString());
|
||||
json.put("email",email.getText().toString());
|
||||
HttpUtils.post(HttpApi.HOME_URL+HttpApi.USER_REG, json, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
@ -135,6 +138,10 @@ public class RegisterActivity extends AppCompatActivity implements View.OnClickL
|
||||
Toast.makeText(this, "密码不一致", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
if(TextUtils.isEmpty(email.getText().toString().toLowerCase())){
|
||||
Toast.makeText(this, "请输入邮箱", Toast.LENGTH_SHORT).show();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
// TODO validate success, do something
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
@ -12,14 +12,14 @@ import android.widget.TextView;
|
||||
|
||||
import com.classichu.lineseditview.LinesEditView;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.SystemData;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ActivitysManager;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianr_mg.Data.AppData;
|
||||
import com.yutou.jianr_mg.Data.SystemData;
|
||||
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.R;
|
||||
import com.yutou.jianr_mg.Tools.ActivitysManager;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -15,16 +15,16 @@ import android.widget.Toast;
|
||||
|
||||
import com.leon.lfilepickerlibrary.LFilePicker;
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Data.TModfile;
|
||||
import com.yutou.jianrmg_v2.Data.TModfilePath;
|
||||
import com.yutou.jianrmg_v2.Interfaces.ModInterface;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.RootUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
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;
|
||||
import com.yutou.jianr_mg.Tools.ModUtils;
|
||||
import com.yutou.jianr_mg.Tools.RootUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
@ -0,0 +1,67 @@
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianr_mg.Adapters.GameDataAdapters.WarAdapter;
|
||||
import com.yutou.jianr_mg.Adapters.WarLogAdapter;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.lemon.view.RefreshRecyclerView;
|
||||
|
||||
public class WarLogActivity extends AppCompatActivity {
|
||||
List<Map> list;
|
||||
private RefreshRecyclerView recyclerView;
|
||||
private WarLogAdapter adapter;
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_favorite);
|
||||
initView();
|
||||
try {
|
||||
list = JSON.parseArray(getIntent().getStringExtra("data"), Map.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if(list==null){
|
||||
list=new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
recyclerView = (RefreshRecyclerView) findViewById(R.id.recyclerView);
|
||||
adapter=new WarLogAdapter(this);
|
||||
recyclerView.setSwipeRefreshColors(0xFF437845, 0xFFE44F98, 0xFF2FAC21);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.VERTICAL, false));
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.dismissSwipeRefresh();
|
||||
recyclerView.addRefreshAction(() -> {
|
||||
try {
|
||||
|
||||
initData();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
initData();
|
||||
}
|
||||
|
||||
private void initData() {
|
||||
adapter.clear();
|
||||
adapter.addAll(list);
|
||||
adapter.notifyDataSetChanged();
|
||||
recyclerView.dismissSwipeRefresh();
|
||||
recyclerView.showNoMore();
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
@ -10,12 +10,12 @@ import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Switch;
|
||||
|
||||
import com.yutou.jianrmg_v2.Adapters.MagicTeamDataAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.TeamData;
|
||||
import com.yutou.jianrmg_v2.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianrmg_v2.Tools.JianRUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.services.MagicBoxService;
|
||||
import com.yutou.jianr_mg.Adapters.MagicTeamDataAdapter;
|
||||
import com.yutou.jianr_mg.Data.TeamData;
|
||||
import com.yutou.jianr_mg.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianr_mg.Tools.JianRUtils;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.services.MagicBoxService;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
@ -29,13 +29,16 @@ import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import Interfaces.MagicBoxInterface;
|
||||
|
||||
public class WarView {
|
||||
private JSONObject data,message;
|
||||
private JSONObject data,message,nMsg,nightData;
|
||||
private MagicTeamDataAdapter adapter;
|
||||
private JianRDataDataBase dataBase;
|
||||
private Context context;
|
||||
private int width=-1;
|
||||
private Handler handler;
|
||||
private boolean isNight=false;
|
||||
|
||||
public WarView(Context context, JSONObject warData, int width, Handler handler){
|
||||
this.data=warData;
|
||||
@ -48,12 +51,22 @@ public class WarView {
|
||||
}
|
||||
}
|
||||
private Timer timer;
|
||||
private String md5="";
|
||||
private String md5="",nMd5="";
|
||||
public void update(MagicBoxService service, int width){
|
||||
try{
|
||||
this.width=width;
|
||||
params.weight=width;
|
||||
linearLayout.setLayoutParams(params);
|
||||
/*service.addInterface(new MagicBoxInterface() {
|
||||
@Override
|
||||
public void getData(String data) {
|
||||
try {
|
||||
JSONObject json=new JSONObject(data);//准备修复战斗剧透无法剧透夜战的BUG
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});*/
|
||||
if(timer==null){
|
||||
timer=new Timer();
|
||||
timer.schedule(new TimerTask() {
|
||||
@ -61,7 +74,9 @@ public class WarView {
|
||||
public void run() {
|
||||
try{
|
||||
WarView.this.data=service.getDealNode();
|
||||
WarView.this.nightData=service.getGetWarResult();
|
||||
WarView.this.message=new JSONObject(data.getString("message"));
|
||||
//昼战
|
||||
if(!Utils.getMD5(WarView.this.message.toString()).equals(md5)){
|
||||
md5=Utils.getMD5(WarView.this.message.toString());
|
||||
|
||||
@ -76,6 +91,27 @@ public class WarView {
|
||||
System.out.println(adapter.getItem(0).toString());
|
||||
handler.post(() -> adapter.notifyDataSetChanged());
|
||||
}
|
||||
//夜战
|
||||
nMsg=new JSONObject(WarView.this.nightData.getString("message"));
|
||||
isNight = !nMsg.isNull("extraProgress");
|
||||
if(!Utils.getMD5(nMsg.toString()).equals(nMd5)){
|
||||
System.out.println("夜战,TAG:"+listView.getTag());
|
||||
nMd5=Utils.getMD5(nMsg.toString());
|
||||
if(!nMsg.isNull("extraProgress")){
|
||||
if((int)listView.getTag()==1){
|
||||
System.out.println("夜战,敌舰");
|
||||
adapter.setData(getNightEnemyTeam(nMsg));
|
||||
listView.setTag(0);
|
||||
}else {
|
||||
System.out.println("夜战,己方");
|
||||
adapter.setData(getNightUserTeam(nMsg));
|
||||
listView.setTag(1);
|
||||
}
|
||||
System.out.println("更新夜战:"+adapter.getCount()+" "+listView.getTag());
|
||||
System.out.println(adapter.getItem(0).toString());
|
||||
handler.post(() -> adapter.notifyDataSetChanged());
|
||||
}
|
||||
}
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
@ -111,10 +147,18 @@ public class WarView {
|
||||
button.setText("切换队伍");
|
||||
button.setOnClickListener(view -> {
|
||||
if ((int) listView.getTag() == 1) {
|
||||
adapter.setData(getEnemyTeam(message));
|
||||
if(isNight){
|
||||
adapter.setData(getNightEnemyTeam(nMsg));
|
||||
}else {
|
||||
adapter.setData(getEnemyTeam(message));
|
||||
}
|
||||
listView.setTag(0);
|
||||
} else {
|
||||
adapter.setData(getUserTeam(message));
|
||||
if(isNight){
|
||||
adapter.setData(getNightUserTeam(nMsg));
|
||||
}else {
|
||||
adapter.setData(getUserTeam(message));
|
||||
}
|
||||
listView.setTag(1);
|
||||
}
|
||||
adapter.notifyDataSetChanged();
|
||||
@ -186,6 +230,42 @@ public class WarView {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
private List<TeamData> getNightUserTeam(JSONObject json){
|
||||
List<TeamData> data=getUserTeam(message);
|
||||
System.out.println("用户数量:"+data.size());
|
||||
try {
|
||||
JSONObject warRepoot = json.getJSONObject("warResult");
|
||||
JSONArray selfShips = warRepoot.getJSONArray("selfShipResults");
|
||||
for (int i = 0; i < selfShips.length(); i++) {
|
||||
JSONObject js = selfShips.getJSONObject(i);
|
||||
TeamData ut= data.get(i);
|
||||
ut.setHp(js.getInt("hp")+"");
|
||||
data.set(i,ut);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
private List<TeamData> getNightEnemyTeam(JSONObject json){
|
||||
List<TeamData> data=getEnemyTeam(message);
|
||||
try {
|
||||
JSONObject warRepoot = json.getJSONObject("warResult");
|
||||
JSONArray selfShips = warRepoot.getJSONArray("enemyShipResults");
|
||||
System.out.println("血量参数:"+selfShips.length());
|
||||
for (int i = 0; i < selfShips.length(); i++) {
|
||||
JSONObject js = selfShips.getJSONObject(i);
|
||||
System.out.println("敌方血量:"+js.getInt("hp"));
|
||||
System.out.println("敌方数量:"+data.size());
|
||||
TeamData ut= data.get(i);
|
||||
ut.setHp(js.getInt("hp")+"");
|
||||
data.set(i,ut);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
private List<TeamData> getEnemyTeam(JSONObject json) {
|
||||
List<TeamData> data = new ArrayList<>();
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.net.http.SslError;
|
||||
import android.os.Bundle;
|
||||
@ -11,8 +11,8 @@ import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import com.umeng.analytics.MobclickAgent;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Log;
|
||||
|
||||
|
||||
/**
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
package com.yutou.jianr_mg.views;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -13,10 +13,10 @@ import android.widget.LinearLayout;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Switch;
|
||||
|
||||
import com.yutou.jianrmg_v2.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.services.WindowsService;
|
||||
import com.yutou.jianr_mg.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianr_mg.R;
|
||||
import com.yutou.jianr_mg.Tools.Utils;
|
||||
import com.yutou.jianr_mg.services.WindowsService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@ -33,6 +33,7 @@ public class WindowsStartActivity extends AppCompatActivity implements View.OnCl
|
||||
private Button nameRemove;
|
||||
private LinearLayout dataConfig;
|
||||
private Button start;
|
||||
private Button help;
|
||||
ArrayAdapter typeAdapter;
|
||||
ArrayAdapter nameAdapter;
|
||||
|
||||
@ -54,12 +55,14 @@ public class WindowsStartActivity extends AppCompatActivity implements View.OnCl
|
||||
nameRemove = findViewById(R.id.nameRemove);
|
||||
dataConfig = findViewById(R.id.dataConfig);
|
||||
start = findViewById(R.id.start);
|
||||
help = findViewById(R.id.help);
|
||||
|
||||
typeAdd.setOnClickListener(this);
|
||||
typeRemove.setOnClickListener(this);
|
||||
nameAdd.setOnClickListener(this);
|
||||
nameRemove.setOnClickListener(this);
|
||||
start.setOnClickListener(this);
|
||||
help.setOnClickListener(this);
|
||||
|
||||
saveData.setOnCheckedChangeListener((compoundButton, b) -> {
|
||||
if (b) {
|
||||
@ -152,6 +155,11 @@ public class WindowsStartActivity extends AppCompatActivity implements View.OnCl
|
||||
startService(intent);
|
||||
finish();
|
||||
break;
|
||||
case R.id.help:
|
||||
Intent hpIntent=new Intent(this,WebActivity.class);
|
||||
hpIntent.putExtra("url","http://bbs.jianrmod.cn/forum.php?mod=viewthread&tid=185&page=1&extra=#pid340");
|
||||
startActivity(hpIntent);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
package com.yutou.jianrmg_v2.Adapters.GameDataAdapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import cn.lemon.view.adapter.BaseViewHolder;
|
||||
import cn.lemon.view.adapter.RecyclerAdapter;
|
||||
|
||||
public class WarAdapter extends RecyclerAdapter<Map<String,String>> {
|
||||
public WarAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BaseViewHolder<Map<String, String>> onCreateBaseViewHolder(ViewGroup parent, int viewType) {
|
||||
return new MyHolder(parent, R.layout.item_team);
|
||||
}
|
||||
class MyHolder extends BaseViewHolder<Map<String,String>>{
|
||||
|
||||
public MyHolder(ViewGroup parent, int layoutId) {
|
||||
super(parent, layoutId);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
package com.yutou.jianrmg_v2.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 android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import com.yutou.jianrmg_v2.Adapters.GameDataAdapters.DropAdapter;
|
||||
import com.yutou.jianrmg_v2.Adapters.GameDataAdapters.WarAdapter;
|
||||
import com.yutou.jianrmg_v2.Databases.JianRDataDataBase;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
|
||||
import org.angmarch.views.NiceSpinner;
|
||||
|
||||
import cn.lemon.view.RefreshRecyclerView;
|
||||
|
||||
public class WarFragment extends Fragment {
|
||||
private static WarFragment fragment;
|
||||
private View view;
|
||||
private NiceSpinner src, type;
|
||||
private JianRDataDataBase database;
|
||||
private RefreshRecyclerView recyclerView;
|
||||
private WarAdapter adapter;
|
||||
|
||||
public static WarFragment init(){
|
||||
if(fragment==null){
|
||||
fragment=new WarFragment();
|
||||
}
|
||||
return fragment;
|
||||
}
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
if(view!=null){
|
||||
return view;
|
||||
}
|
||||
view=inflater.inflate(R.layout.fragment_drop,null);
|
||||
initView();
|
||||
|
||||
return view;
|
||||
}
|
||||
public void initView() {
|
||||
src = view.findViewById(R.id.src);
|
||||
type = view.findViewById(R.id.type);
|
||||
recyclerView = view.findViewById(R.id.recyclerView);
|
||||
recyclerView.setSwipeRefreshColors(0xFF437845, 0xFFE44F98, 0xFF2FAC21);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
||||
adapter = new WarAdapter(getContext());
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.dismissSwipeRefresh();
|
||||
recyclerView.addRefreshAction(() -> {
|
||||
try {
|
||||
src.setSelectedIndex(0);
|
||||
type.setSelectedIndex(0);
|
||||
new Handler().postAtTime(() -> {
|
||||
recyclerView.dismissSwipeRefresh();
|
||||
recyclerView.showNoMore();
|
||||
Utils.toast(getContext(),"还在摸,咕了");
|
||||
}, 0, 100);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
@ -4,6 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
tools:context=".LoadingActivity"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
@ -117,6 +117,33 @@
|
||||
android:hint="再输入一次密码"
|
||||
android:inputType="textPassword" />
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout6"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout5">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="邮 箱" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/email"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:ems="10"
|
||||
android:hint="请输入邮箱(找回密码唯一途径)"
|
||||
android:inputType="textEmailAddress" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/buttons"
|
||||
@ -128,7 +155,7 @@
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout5">
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout6">
|
||||
|
||||
<Button
|
||||
android:id="@+id/login"
|
||||
|
@ -106,4 +106,18 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dataConfig" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/help"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="帮助"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/start"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dataConfig" />
|
||||
</android.support.constraint.ConstraintLayout>
|
@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">魔改宝盒2(内测版)</string>
|
||||
<string name="app_name">魔改宝盒</string>
|
||||
<string name="title_activity_base">BaseActivity</string>
|
||||
<string name="ui_home_action">当前活动</string>
|
||||
<string name="ui_home_action_time">--:--:--</string>
|
||||
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.plugs.test.app1;
|
||||
package com.yutou.jianr_mg.plugs.test.app1;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.test.InstrumentationRegistry;
|
||||
@ -21,6 +21,6 @@ public class ExampleInstrumentedTest {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getTargetContext();
|
||||
|
||||
assertEquals("com.yutou.jianrmg_v2.plugs.test.app1.test", appContext.getPackageName());
|
||||
assertEquals("com.yutou.jianr_mg.plugs.test.app1.test", appContext.getPackageName());
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.plugins;
|
||||
package com.yutou.jianr_mg.plugins;
|
||||
|
||||
public class Data {
|
||||
public static String name="test";
|
||||
@ -6,6 +6,6 @@ public class Data {
|
||||
public static String appId="abcdefg";
|
||||
public static String url="#";
|
||||
public static String image="#";
|
||||
public static String mainFunction="com.yutou.jianrmg_v2.plugs.test.app1.MainActivity#localActivity";
|
||||
public static String mainFunction="com.yutou.jianr_mg.plugs.test.app1.MainActivity#localActivity";
|
||||
public static Integer permission=0;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.yutou.jianrmg_v2.plugs.test.app1;
|
||||
package com.yutou.jianr_mg.plugs.test.app1;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user