init
1
BaseModel/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/build
|
||||
70
BaseModel/build.gradle
Normal file
@@ -0,0 +1,70 @@
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 26
|
||||
|
||||
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 26
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
||||
|
||||
implementation 'com.android.support:appcompat-v7:26.1.0'
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.1'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
|
||||
//okhttp
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.9.1'
|
||||
//FastJson
|
||||
implementation 'com.alibaba:fastjson:1.2.41'
|
||||
//轮播图
|
||||
implementation 'com.bigkoo:convenientbanner:2.0.5'
|
||||
//图片流缓存
|
||||
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
|
||||
//圆形图片
|
||||
implementation 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
|
||||
//滑动Tabs
|
||||
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
|
||||
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar'
|
||||
//MD 对话框
|
||||
implementation 'me.drakeet.materialdialog:library:1.3.1'
|
||||
//载入界面
|
||||
implementation 'com.kaopiz:kprogresshud:1.1.0'
|
||||
|
||||
//文件选择器
|
||||
implementation 'com.leon:lfilepickerlibrary:1.4.0'
|
||||
//富文本
|
||||
implementation 'com.github.limedroid:XRichText:v1.0.0'
|
||||
//底端对话框
|
||||
implementation 'com.orhanobut:dialogplus:1.11@aar'
|
||||
//二维码扫描
|
||||
implementation 'com.dlazaro66.qrcodereaderview:qrcodereaderview:2.0.3'
|
||||
//底端菜单
|
||||
implementation 'me.majiajie:pager-bottom-tab-strip:2.2.5'
|
||||
//刷新载入
|
||||
implementation project(path: ':RefreshRecyclerView')
|
||||
//图片形状
|
||||
implementation 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
|
||||
//毛玻璃
|
||||
implementation 'jp.wasabeef:glide-transformations:3.0.0'
|
||||
// compile project(path: ':app')
|
||||
compile project(path: ':ResModl')
|
||||
}
|
||||
21
BaseModel/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
9
BaseModel/src/main/AndroidManifest.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.yutou.jianrmg_v2.basemodel" >
|
||||
<application>
|
||||
<activity android:name=".Test">
|
||||
|
||||
</activity>
|
||||
<activity android:name=".views.WebActivity"/>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,31 @@
|
||||
package Interfaces;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/27.
|
||||
*/
|
||||
|
||||
public interface BaseActivityInterface {
|
||||
void onCreate(Bundle savedInstanceState, LinearLayout layout, Context context, Intent intent);
|
||||
void onRestart();
|
||||
void onResume();
|
||||
void onPause();
|
||||
void onDestroy();
|
||||
void getIntent(Intent intent);
|
||||
boolean onKeyDown(int keyCode, KeyEvent event);
|
||||
boolean onKeyUp(int keyCode, KeyEvent event);
|
||||
boolean onTouchEvent(MotionEvent event);
|
||||
Data getData();
|
||||
class Data{
|
||||
private String type;
|
||||
private String url;
|
||||
|
||||
}
|
||||
}
|
||||
15
BaseModel/src/main/java/Interfaces/BaseFragmeneInerface.java
Normal file
@@ -0,0 +1,15 @@
|
||||
package Interfaces;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
public interface BaseFragmeneInerface {
|
||||
void init(Context context);
|
||||
View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState);
|
||||
void setIntent();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.DataSetObserver;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class MyItemGridViewAdapter extends BaseAdapter {
|
||||
public static class ItemData{
|
||||
private String title;
|
||||
private int imageUrl=-1;
|
||||
|
||||
public ItemData(int imageUrl, String title) {
|
||||
this.imageUrl = imageUrl;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public int getImageUrl() {
|
||||
return imageUrl;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
}
|
||||
private List<ItemData> list;
|
||||
private Context context;
|
||||
|
||||
public MyItemGridViewAdapter(List<ItemData> list, Context context) {
|
||||
this.list = list;
|
||||
this.context = context;
|
||||
Log.i("List Size",""+list.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return list.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getItem(int i) {
|
||||
return list.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getItemId(int i) {
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final int i, View view, ViewGroup viewGroup) {
|
||||
Item item=null;
|
||||
if(view==null){
|
||||
item=new Item();
|
||||
view= LayoutInflater.from(context).inflate(R.layout.item_my_gridview,null);
|
||||
item.imageView=view.findViewById(R.id.image);
|
||||
item.title=view.findViewById(R.id.title);
|
||||
view.setTag(item);
|
||||
}else{
|
||||
item= (Item) view.getTag();
|
||||
}
|
||||
if(list.get(i).imageUrl!=-1){
|
||||
item.imageView.setImageResource(list.get(i).getImageUrl());
|
||||
}
|
||||
item.title.setText(list.get(i).title);
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Log.i("点击"+list.get(i).getTitle());
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
|
||||
private class Item{
|
||||
private ImageView imageView;
|
||||
private TextView title;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Adapters;
|
||||
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentPagerAdapter;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class ViewPagerAdapter extends FragmentPagerAdapter {
|
||||
private List<Fragment> mlist;
|
||||
|
||||
public ViewPagerAdapter(FragmentManager fm,List<Fragment> list) {
|
||||
super(fm);
|
||||
this.mlist = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
return mlist.get(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return mlist.size();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yutou.jianrmg_v2.basemodel;
|
||||
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.User;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.ActivitysManager;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.ConfigUtils;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import dalvik.system.DexClassLoader;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class Application extends android.app.Application {
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
init();
|
||||
// initPlugsin();
|
||||
regActivity();
|
||||
}
|
||||
private void initPlugsin(){
|
||||
Map<String,DexClassLoader> plugsin=new HashMap<>();
|
||||
File path=new File(Utils.getSDCardPath()+"/plugin/");
|
||||
for (File file : path.listFiles()) {
|
||||
if(file.getName().contains(".jar")){
|
||||
DexClassLoader dexClassLoader=new DexClassLoader(file.getAbsolutePath(),"/data/data/"+getPackageName()+"/",null,getClassLoader());
|
||||
plugsin.put(file.getName(),dexClassLoader);
|
||||
}
|
||||
}
|
||||
AppData.plugsin=plugsin;
|
||||
}
|
||||
private void init(){
|
||||
AppData.Token= (String) ConfigUtils.init().load("token");
|
||||
AppData.user=new User();
|
||||
try {
|
||||
AppData.user.setId((Integer) ConfigUtils.init().load("uid"));
|
||||
}catch (Exception e){
|
||||
AppData.user.setId(-1);
|
||||
}
|
||||
|
||||
}
|
||||
private void regActivity(){
|
||||
registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
|
||||
@Override
|
||||
public void onActivityCreated(Activity activity, Bundle bundle) {
|
||||
Log.i("Appliction","创建:"+activity.getClass().getName());
|
||||
ActivitysManager.addActivity(activity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStarted(Activity activity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResumed(Activity activity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityPaused(Activity activity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityStopped(Activity activity) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivitySaveInstanceState(Activity activity, Bundle bundle) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityDestroyed(Activity activity) {
|
||||
Log.i("Appliction","销毁:"+activity.getClass().getName());
|
||||
ActivitysManager.finishActivity(activity);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import dalvik.system.DexClassLoader;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/2.
|
||||
*/
|
||||
|
||||
public class AppData {
|
||||
public static List<MGamePackname> packnames;
|
||||
public static Map<String,DexClassLoader> plugsin;
|
||||
public static SConfig appConfig;
|
||||
public static User user;
|
||||
public static UUserdata userdata;
|
||||
public static String Token="";
|
||||
|
||||
public static boolean RxDeBug=true;
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class MAppHome {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_home.id
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_home.name
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_home.icon
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
private String icon;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_home.url
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_home.isshow
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
private Integer isshow;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_home.id
|
||||
* @return the value of m_app_home.id
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_home.id
|
||||
* @param id the value for m_app_home.id
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_home.name
|
||||
* @return the value of m_app_home.name
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_home.name
|
||||
* @param name the value for m_app_home.name
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_home.icon
|
||||
* @return the value of m_app_home.icon
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_home.icon
|
||||
* @param icon the value for m_app_home.icon
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_home.url
|
||||
* @return the value of m_app_home.url
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_home.url
|
||||
* @param url the value for m_app_home.url
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_home.isshow
|
||||
* @return the value of m_app_home.isshow
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public Integer getIsshow() {
|
||||
return isshow;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_home.isshow
|
||||
* @param isshow the value for m_app_home.isshow
|
||||
* @mbg.generated Tue Jan 23 12:06:19 CST 2018
|
||||
*/
|
||||
public void setIsshow(Integer isshow) {
|
||||
this.isshow = isshow;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,213 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
|
||||
public class MAppMg{
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.id
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.indexs
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private Integer indexs;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.name
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.icon
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private String icon;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.mg_type
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private String mgType;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.isshow
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private Integer isshow;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.url
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.version
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private Integer version;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_app_mg.main_function
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
private String mainFunction;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.id
|
||||
* @return the value of m_app_mg.id
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.id
|
||||
* @param id the value for m_app_mg.id
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.indexs
|
||||
* @return the value of m_app_mg.indexs
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public Integer getIndexs() {
|
||||
return indexs;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.indexs
|
||||
* @param indexs the value for m_app_mg.indexs
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setIndexs(Integer indexs) {
|
||||
this.indexs = indexs;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.name
|
||||
* @return the value of m_app_mg.name
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.name
|
||||
* @param name the value for m_app_mg.name
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.icon
|
||||
* @return the value of m_app_mg.icon
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.icon
|
||||
* @param icon the value for m_app_mg.icon
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.mg_type
|
||||
* @return the value of m_app_mg.mg_type
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public String getMgType() {
|
||||
return mgType;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.mg_type
|
||||
* @param mgType the value for m_app_mg.mg_type
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setMgType(String mgType) {
|
||||
this.mgType = mgType;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.isshow
|
||||
* @return the value of m_app_mg.isshow
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public Integer getIsshow() {
|
||||
return isshow;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.isshow
|
||||
* @param isshow the value for m_app_mg.isshow
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setIsshow(Integer isshow) {
|
||||
this.isshow = isshow;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.url
|
||||
* @return the value of m_app_mg.url
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.url
|
||||
* @param url the value for m_app_mg.url
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.version
|
||||
* @return the value of m_app_mg.version
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public Integer getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.version
|
||||
* @param version the value for m_app_mg.version
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setVersion(Integer version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_app_mg.main_function
|
||||
* @return the value of m_app_mg.main_function
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public String getMainFunction() {
|
||||
return mainFunction;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_app_mg.main_function
|
||||
* @param mainFunction the value for m_app_mg.main_function
|
||||
* @mbg.generated Wed Feb 28 13:25:37 CST 2018
|
||||
*/
|
||||
public void setMainFunction(String mainFunction) {
|
||||
this.mainFunction = mainFunction;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class MBanner {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_banner.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_banner.url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_banner.click
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String click;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_banner.isshow
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer isshow;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_banner.id
|
||||
* @return the value of m_banner.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_banner.id
|
||||
* @param id the value for m_banner.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_banner.url
|
||||
* @return the value of m_banner.url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_banner.url
|
||||
* @param url the value for m_banner.url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_banner.click
|
||||
* @return the value of m_banner.click
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getClick() {
|
||||
return click;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_banner.click
|
||||
* @param click the value for m_banner.click
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setClick(String click) {
|
||||
this.click = click;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_banner.isshow
|
||||
* @return the value of m_banner.isshow
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getIsshow() {
|
||||
return isshow;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_banner.isshow
|
||||
* @param isshow the value for m_banner.isshow
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setIsshow(Integer isshow) {
|
||||
this.isshow = isshow;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class MGamePackname {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_game_packname.id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_game_packname.packname
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String packname;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_game_packname.zhname
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String zhname;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column m_game_packname.isshow
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer isshow;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_game_packname.id
|
||||
* @return the value of m_game_packname.id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_game_packname.id
|
||||
* @param id the value for m_game_packname.id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_game_packname.packname
|
||||
* @return the value of m_game_packname.packname
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getPackname() {
|
||||
return packname;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_game_packname.packname
|
||||
* @param packname the value for m_game_packname.packname
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setPackname(String packname) {
|
||||
this.packname = packname;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_game_packname.zhname
|
||||
* @return the value of m_game_packname.zhname
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getZhname() {
|
||||
return zhname;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_game_packname.zhname
|
||||
* @param zhname the value for m_game_packname.zhname
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setZhname(String zhname) {
|
||||
this.zhname = zhname;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column m_game_packname.isshow
|
||||
* @return the value of m_game_packname.isshow
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getIsshow() {
|
||||
return isshow;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column m_game_packname.isshow
|
||||
* @param isshow the value for m_game_packname.isshow
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setIsshow(Integer isshow) {
|
||||
this.isshow = isshow;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class SConfig {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.apk_version
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String apkVersion;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.msg_version
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String msgVersion;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.apk_url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String apkUrl;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.msg_url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String msgUrl;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.message
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String message;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column s_config.downloadHome
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String downloadhome;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.id
|
||||
* @return the value of s_config.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.id
|
||||
* @param id the value for s_config.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.apk_version
|
||||
* @return the value of s_config.apk_version
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getApkVersion() {
|
||||
return apkVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.apk_version
|
||||
* @param apkVersion the value for s_config.apk_version
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setApkVersion(String apkVersion) {
|
||||
this.apkVersion = apkVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.msg_version
|
||||
* @return the value of s_config.msg_version
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getMsgVersion() {
|
||||
return msgVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.msg_version
|
||||
* @param msgVersion the value for s_config.msg_version
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setMsgVersion(String msgVersion) {
|
||||
this.msgVersion = msgVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.apk_url
|
||||
* @return the value of s_config.apk_url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getApkUrl() {
|
||||
return apkUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.apk_url
|
||||
* @param apkUrl the value for s_config.apk_url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setApkUrl(String apkUrl) {
|
||||
this.apkUrl = apkUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.msg_url
|
||||
* @return the value of s_config.msg_url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getMsgUrl() {
|
||||
return msgUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.msg_url
|
||||
* @param msgUrl the value for s_config.msg_url
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setMsgUrl(String msgUrl) {
|
||||
this.msgUrl = msgUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.message
|
||||
* @return the value of s_config.message
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.message
|
||||
* @param message the value for s_config.message
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column s_config.downloadHome
|
||||
* @return the value of s_config.downloadHome
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getDownloadhome() {
|
||||
if(downloadhome!=null)
|
||||
return downloadhome;
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column s_config.downloadHome
|
||||
* @param downloadhome the value for s_config.downloadHome
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setDownloadhome(String downloadhome) {
|
||||
this.downloadhome = downloadhome;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,428 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class TMod {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TMod [id=" + id + ", modname=" + modname + ", title=" + title + ", modtype=" + modtype + ", jianrtype="
|
||||
+ jianrtype + ", jianrId=" + jianrId + ", info=" + info + ", byid=" + byid + ", byuser=" + byuser
|
||||
+ ", overview=" + overview + ", image=" + image + ", icon=" + icon + ", createtime=" + createtime
|
||||
+ ", updatetime=" + updatetime + ", modversion=" + modversion + ", gameverid=" + gameverid + ", city="
|
||||
+ city + "]";
|
||||
}
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.modName
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String modname;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.title
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.modType
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String modtype;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.jianrType
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String jianrtype;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.jianr_id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer jianrId;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.info
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String info;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.byId
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer byid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.byUser
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String byuser;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.overview
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String overview;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.image
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String image;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.icon
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private String icon;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.createTime
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Long createtime;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.updateTime
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Long updatetime;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.modVersion
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer modversion;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.gameVerId
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer gameverid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.city
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer city;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_mod.reMod
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
private Integer remod;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.id
|
||||
* @return the value of t_mod.id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.id
|
||||
* @param id the value for t_mod.id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.modName
|
||||
* @return the value of t_mod.modName
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getModname() {
|
||||
return modname;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.modName
|
||||
* @param modname the value for t_mod.modName
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setModname(String modname) {
|
||||
this.modname = modname;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.title
|
||||
* @return the value of t_mod.title
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.title
|
||||
* @param title the value for t_mod.title
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.modType
|
||||
* @return the value of t_mod.modType
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getModtype() {
|
||||
return modtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.modType
|
||||
* @param modtype the value for t_mod.modType
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setModtype(String modtype) {
|
||||
this.modtype = modtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.jianrType
|
||||
* @return the value of t_mod.jianrType
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getJianrtype() {
|
||||
return jianrtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.jianrType
|
||||
* @param jianrtype the value for t_mod.jianrType
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setJianrtype(String jianrtype) {
|
||||
this.jianrtype = jianrtype;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.jianr_id
|
||||
* @return the value of t_mod.jianr_id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getJianrId() {
|
||||
return jianrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.jianr_id
|
||||
* @param jianrId the value for t_mod.jianr_id
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setJianrId(Integer jianrId) {
|
||||
this.jianrId = jianrId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.info
|
||||
* @return the value of t_mod.info
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.info
|
||||
* @param info the value for t_mod.info
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.byId
|
||||
* @return the value of t_mod.byId
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getByid() {
|
||||
return byid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.byId
|
||||
* @param byid the value for t_mod.byId
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setByid(Integer byid) {
|
||||
this.byid = byid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.byUser
|
||||
* @return the value of t_mod.byUser
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getByuser() {
|
||||
return byuser;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.byUser
|
||||
* @param byuser the value for t_mod.byUser
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setByuser(String byuser) {
|
||||
this.byuser = byuser;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.overview
|
||||
* @return the value of t_mod.overview
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getOverview() {
|
||||
return overview;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.overview
|
||||
* @param overview the value for t_mod.overview
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setOverview(String overview) {
|
||||
this.overview = overview;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.image
|
||||
* @return the value of t_mod.image
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.image
|
||||
* @param image the value for t_mod.image
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.icon
|
||||
* @return the value of t_mod.icon
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.icon
|
||||
* @param icon the value for t_mod.icon
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.createTime
|
||||
* @return the value of t_mod.createTime
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Long getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.createTime
|
||||
* @param createtime the value for t_mod.createTime
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setCreatetime(Long createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.updateTime
|
||||
* @return the value of t_mod.updateTime
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Long getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.updateTime
|
||||
* @param updatetime the value for t_mod.updateTime
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setUpdatetime(Long updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.modVersion
|
||||
* @return the value of t_mod.modVersion
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getModversion() {
|
||||
return modversion;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.modVersion
|
||||
* @param modversion the value for t_mod.modVersion
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setModversion(Integer modversion) {
|
||||
this.modversion = modversion;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.gameVerId
|
||||
* @return the value of t_mod.gameVerId
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getGameverid() {
|
||||
return gameverid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.gameVerId
|
||||
* @param gameverid the value for t_mod.gameVerId
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setGameverid(Integer gameverid) {
|
||||
this.gameverid = gameverid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.city
|
||||
* @return the value of t_mod.city
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.city
|
||||
* @param city the value for t_mod.city
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setCity(Integer city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_mod.reMod
|
||||
* @return the value of t_mod.reMod
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public Integer getRemod() {
|
||||
return remod;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_mod.reMod
|
||||
* @param remod the value for t_mod.reMod
|
||||
* @mbg.generated Tue Feb 06 15:48:54 CST 2018
|
||||
*/
|
||||
public void setRemod(Integer remod) {
|
||||
this.remod = remod;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class TModfile {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.id
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.mid
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private Integer mid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.fileName
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private String filename;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.serviceUrl
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private String serviceurl;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.installPathId
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private String installpathid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.createTime
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private Long createtime;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modfile.updateTime
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
private Long updatetime;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.id
|
||||
* @return the value of t_modfile.id
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.id
|
||||
* @param id the value for t_modfile.id
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.mid
|
||||
* @return the value of t_modfile.mid
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public Integer getMid() {
|
||||
return mid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.mid
|
||||
* @param mid the value for t_modfile.mid
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setMid(Integer mid) {
|
||||
this.mid = mid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.fileName
|
||||
* @return the value of t_modfile.fileName
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.fileName
|
||||
* @param filename the value for t_modfile.fileName
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.serviceUrl
|
||||
* @return the value of t_modfile.serviceUrl
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public String getServiceurl() {
|
||||
return AppData.appConfig.getDownloadhome()+serviceurl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.serviceUrl
|
||||
* @param serviceurl the value for t_modfile.serviceUrl
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setServiceurl(String serviceurl) {
|
||||
this.serviceurl = serviceurl;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.installPathId
|
||||
* @return the value of t_modfile.installPathId
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public String getInstallpathid() {
|
||||
return installpathid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.installPathId
|
||||
* @param installpathid the value for t_modfile.installPathId
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setInstallpathid(String installpathid) {
|
||||
this.installpathid = installpathid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.createTime
|
||||
* @return the value of t_modfile.createTime
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public Long getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.createTime
|
||||
* @param createtime the value for t_modfile.createTime
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setCreatetime(Long createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modfile.updateTime
|
||||
* @return the value of t_modfile.updateTime
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public Long getUpdatetime() {
|
||||
return updatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modfile.updateTime
|
||||
* @param updatetime the value for t_modfile.updateTime
|
||||
* @mbg.generated Fri Feb 02 18:11:06 CST 2018
|
||||
*/
|
||||
public void setUpdatetime(Long updatetime) {
|
||||
this.updatetime = updatetime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class TModtag {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modtag.id
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modtag.mid
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
private Integer mid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column t_modtag.tag
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
private String tag;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modtag.id
|
||||
* @return the value of t_modtag.id
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modtag.id
|
||||
* @param id the value for t_modtag.id
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modtag.mid
|
||||
* @return the value of t_modtag.mid
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
public Integer getMid() {
|
||||
return mid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modtag.mid
|
||||
* @param mid the value for t_modtag.mid
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
public void setMid(Integer mid) {
|
||||
this.mid = mid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column t_modtag.tag
|
||||
* @return the value of t_modtag.tag
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column t_modtag.tag
|
||||
* @param tag the value for t_modtag.tag
|
||||
* @mbg.generated Sat Jan 27 12:36:26 CST 2018
|
||||
*/
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class UUsercollection {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_usercollection.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_usercollection.uid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer uid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_usercollection.mid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer mid;
|
||||
private Long createtime;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_usercollection.id
|
||||
* @return the value of u_usercollection.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_usercollection.id
|
||||
* @param id the value for u_usercollection.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_usercollection.uid
|
||||
* @return the value of u_usercollection.uid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_usercollection.uid
|
||||
* @param uid the value for u_usercollection.uid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_usercollection.mid
|
||||
* @return the value of u_usercollection.mid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getMid() {
|
||||
return mid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_usercollection.mid
|
||||
* @param mid the value for u_usercollection.mid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setMid(Integer mid) {
|
||||
this.mid = mid;
|
||||
}
|
||||
|
||||
public Long getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Long createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class UUserdata {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_userdata.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_userdata.uid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer uid;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_userdata.email
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column u_userdata.createTime
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Long createtime;
|
||||
private String image;
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_userdata.id
|
||||
* @return the value of u_userdata.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_userdata.id
|
||||
* @param id the value for u_userdata.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_userdata.uid
|
||||
* @return the value of u_userdata.uid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_userdata.uid
|
||||
* @param uid the value for u_userdata.uid
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_userdata.email
|
||||
* @return the value of u_userdata.email
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_userdata.email
|
||||
* @param email the value for u_userdata.email
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column u_userdata.createTime
|
||||
* @return the value of u_userdata.createTime
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Long getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column u_userdata.createTime
|
||||
* @param createtime the value for u_userdata.createTime
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setCreatetime(Long createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Data;
|
||||
|
||||
public class User {
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column user.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column user.name
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column user.pass
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String pass;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column user.IMEI
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private String imei;
|
||||
/**
|
||||
* This field was generated by MyBatis Generator. This field corresponds to the database column user.power
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
private Integer power;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column user.id
|
||||
* @return the value of user.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column user.id
|
||||
* @param id the value for user.id
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column user.name
|
||||
* @return the value of user.name
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column user.name
|
||||
* @param name the value for user.name
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column user.pass
|
||||
* @return the value of user.pass
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getPass() {
|
||||
return pass;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column user.pass
|
||||
* @param pass the value for user.pass
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setPass(String pass) {
|
||||
this.pass = pass;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column user.IMEI
|
||||
* @return the value of user.IMEI
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public String getImei() {
|
||||
return imei;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column user.IMEI
|
||||
* @param imei the value for user.IMEI
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setImei(String imei) {
|
||||
this.imei = imei;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method returns the value of the database column user.power
|
||||
* @return the value of user.power
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public Integer getPower() {
|
||||
return power;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator. This method sets the value of the database column user.power
|
||||
* @param power the value for user.power
|
||||
* @mbg.generated Sun Jan 21 18:14:28 CST 2018
|
||||
*/
|
||||
public void setPower(Integer power) {
|
||||
this.power = power;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.basemodel.services.DownloadService;
|
||||
|
||||
import Interfaces.BaseFragmeneInerface;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/21.
|
||||
*/
|
||||
|
||||
public class GameData extends Fragment {
|
||||
private static GameData gameData;
|
||||
private DownloadService service;
|
||||
private Activity activity;
|
||||
private BaseFragmeneInerface baseFragmene;
|
||||
|
||||
public static GameData init(Activity activity){
|
||||
if(gameData==null){
|
||||
gameData=new GameData();
|
||||
gameData.baseFragmene.init(activity);
|
||||
}
|
||||
return gameData;
|
||||
}
|
||||
public GameData(){
|
||||
try {
|
||||
baseFragmene= (BaseFragmeneInerface) AppData.plugsin.get("rx.jar").loadClass("com.yutou.jianrmg_v2.gamedatamodel.MainFragmene").newInstance();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.i("加载数据模块失败");
|
||||
baseFragmene=new BaseFragmeneInerface() {
|
||||
private Context context;
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context=context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
ViewGroup.LayoutParams params=new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
TextView textView=new TextView(activity);
|
||||
textView.setLayoutParams(params);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setText("未加载插件,请尝试重启");
|
||||
return textView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIntent() {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void setActivity(Activity activity) {
|
||||
this.activity = activity;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
/*ViewGroup.LayoutParams params=new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
TextView textView=new TextView(getContext());
|
||||
textView.setLayoutParams(params);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setText("Hello World");
|
||||
return textView;*/
|
||||
return baseFragmene.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
|
||||
import Interfaces.BaseFragmeneInerface;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class Home extends Fragment {
|
||||
private static Home home;
|
||||
|
||||
|
||||
private BaseFragmeneInerface baseFragmene;
|
||||
|
||||
public static Home init(Activity activity){
|
||||
if(home==null){
|
||||
home=new Home();
|
||||
home.baseFragmene.init(activity);
|
||||
}
|
||||
return home;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Home(){
|
||||
try {
|
||||
baseFragmene= (BaseFragmeneInerface) AppData.plugsin.get("home.jar").loadClass("com.yutou.jianrmg_v2.apphome.MainFragmene").newInstance();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.i("热插件加载失败,启用默认");
|
||||
baseFragmene=new BaseFragmeneInerface() {
|
||||
private Context context;
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context=context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
ViewGroup.LayoutParams params=new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
TextView textView=new TextView(context);
|
||||
textView.setLayoutParams(params);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setText("未加载插件,请尝试重启");
|
||||
return textView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIntent() {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
return baseFragmene.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Fragments;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
|
||||
import Interfaces.BaseFragmeneInerface;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/23.
|
||||
*/
|
||||
|
||||
public class MGList extends Fragment {
|
||||
private static MGList modView;
|
||||
private BaseFragmeneInerface baseFragmeneInerface;
|
||||
|
||||
public static MGList init(Activity activity) {
|
||||
if (modView == null) {
|
||||
modView = new MGList();
|
||||
modView.baseFragmeneInerface.init(activity);
|
||||
}
|
||||
return modView;
|
||||
}
|
||||
|
||||
public MGList() {
|
||||
try {
|
||||
this.baseFragmeneInerface = (BaseFragmeneInerface) AppData.plugsin.get("mglist.jar").loadClass("com.yutou.jianrmg_v2.mglistmodel.MainFragments").newInstance();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.i("魔改列表插件加载失败");
|
||||
baseFragmeneInerface = new BaseFragmeneInerface() {
|
||||
private Context context;
|
||||
|
||||
@Override
|
||||
public void init(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
ViewGroup.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
TextView textView = new TextView(context);
|
||||
textView.setLayoutParams(params);
|
||||
textView.setGravity(Gravity.CENTER);
|
||||
textView.setText("未加载插件,请尝试重启");
|
||||
return textView;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setIntent() {
|
||||
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
|
||||
return baseFragmeneInerface.onCreateView(inflater, container, savedInstanceState);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Fragments;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.GridLayout;
|
||||
import android.widget.GridView;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
||||
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.basemodel.Adapters.MyItemGridViewAdapter;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.UUserdata;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.User;
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Utils;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import jp.wasabeef.glide.transformations.BlurTransformation;
|
||||
|
||||
import static com.bumptech.glide.request.RequestOptions.bitmapTransform;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/22.
|
||||
*/
|
||||
|
||||
public class My extends Fragment {
|
||||
public static My my;
|
||||
public static My init(){
|
||||
if(my==null){
|
||||
my=new My();
|
||||
}
|
||||
return my;
|
||||
}
|
||||
private View view;
|
||||
private User user;
|
||||
private UUserdata udata;
|
||||
private ImageLoader imageLoader;
|
||||
|
||||
private TextView uname,item_title;
|
||||
private ImageView icon,item_icon,image_top;
|
||||
// private LinearLayout items;
|
||||
private ListView myItems;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||
if(view==null){
|
||||
view=LayoutInflater.from(getContext()).inflate(R.layout.fragment_my,null);
|
||||
uname=view.findViewById(R.id.uname);
|
||||
icon=view.findViewById(R.id.icon);
|
||||
item_title=view.findViewById(R.id.item_title);
|
||||
item_icon=view.findViewById(R.id.item_icon);
|
||||
image_top=view.findViewById(R.id.image_top);
|
||||
// items=view.findViewById(R.id.items);
|
||||
myItems=view.findViewById(R.id._my_items);
|
||||
}
|
||||
imageLoader= Utils.initImageLoader(getContext());
|
||||
initData();
|
||||
return view;
|
||||
}
|
||||
private void initData(){
|
||||
user= AppData.user;
|
||||
udata=AppData.userdata;
|
||||
if(udata==null)
|
||||
udata=new UUserdata();
|
||||
udata.setImage("https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=1209476926,1108056910&fm=58");
|
||||
if(user==null||user.getId()<1){
|
||||
uname.setText("未登录");
|
||||
icon.setImageResource(R.mipmap.ic_launcher);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
uname.setText(user.getName());
|
||||
imageLoader.displayImage(udata.getImage(),icon);
|
||||
Glide.with(this).load(udata.getImage()).apply(bitmapTransform(new BlurTransformation(25))).into(image_top);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
myItems.setAdapter(new MyItemGridViewAdapter(getItemData(),getContext()));
|
||||
}
|
||||
private List<MyItemGridViewAdapter.ItemData> getItemData(){
|
||||
List<MyItemGridViewAdapter.ItemData> list=new ArrayList<>();
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,"下载中心"));
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,"收藏夹"));
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,"问题/建议"));
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,"设置"));
|
||||
/* list.add(new MyItemGridViewAdapter.ItemData(-1,""));
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,""));
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,""));
|
||||
list.add(new MyItemGridViewAdapter.ItemData(-1,""));*/
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Interfaces;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/5.
|
||||
*/
|
||||
|
||||
public interface DownloadFileInerface {
|
||||
boolean downloading(String fileName, int current, long length);
|
||||
void over(boolean isOver);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Interfaces;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.TModfile;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/2.
|
||||
*/
|
||||
|
||||
public interface DownloadInterface {
|
||||
void getDownloadList(int size);
|
||||
void getDownloadFile(TModfile modfile);
|
||||
void getDownloadFileSize(int size);
|
||||
void getCurrent(int current);
|
||||
void over();
|
||||
void start();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Interfaces;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public interface HttpInterface {
|
||||
void httpGetData(String string, int code);
|
||||
void httpError(Exception e);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Network;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class HttpApi {
|
||||
// public static final String HOME_URL="http://192.168.31.240:8088/android/"; //zzz_gz wifi
|
||||
public static final String HOME_URL="http://192.168.137.1:8088/android/"; //笔记本本身WIFI
|
||||
// public static final String HOME_URL="http://game.yutou233.cn/android/"; //服务器
|
||||
|
||||
public static final String MOD_ALL="mod/all.do";
|
||||
public static final String MOD_TYPE="mod/getType.do";
|
||||
public static final String MOD_REMOD="mod/remod.do";
|
||||
public static final String MOD_USER_LIST="mod/user.do";
|
||||
public static final String MOD_TAG="mod/tags.do";
|
||||
public static final String MOD_DOWNLOAD="mod/download.do";
|
||||
public static final String MOD_GAME_PACKNAME="mod/packnames.do";
|
||||
public static final String MOD_COLLCETION="mod/collection.do";
|
||||
|
||||
public static final String BANNER="banner/get.do";
|
||||
|
||||
public static final String MG_HOME_LIST="config/home.do";
|
||||
public static final String MG_MG_LIST="config/mg.do";
|
||||
public static final String MG_CONFIG="config/update.do";
|
||||
|
||||
public static final String USER_LOGIN="user/login.do";
|
||||
public static final String USER_REG="user/reg.do";
|
||||
public static final String USER_RELOAD="user/reload.do";
|
||||
public static final String USER_LOGOUT="user/logout.do";
|
||||
public static final String USER_TEST="user/test.do";
|
||||
}
|
||||
@@ -0,0 +1,181 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Network;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.FormBody;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class HttpUtils {
|
||||
private static OkHttpClient client;
|
||||
private static OkHttpClient getClient(){
|
||||
return new OkHttpClient.Builder()
|
||||
.connectTimeout(3000, TimeUnit.SECONDS)
|
||||
.readTimeout(3000,TimeUnit.SECONDS).build();
|
||||
|
||||
}
|
||||
public static void get(final String url, final HttpInterface httpInterface) {
|
||||
if(client==null){
|
||||
client=getClient();
|
||||
}
|
||||
Log.i("GET",url);
|
||||
Request request = new Request.Builder().url(url).build();
|
||||
Call call = client.newCall(request);
|
||||
call.enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
httpInterface.httpError(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) {
|
||||
try {
|
||||
String http=response.body().string();
|
||||
if(httpInterface!=null)
|
||||
httpInterface.httpGetData(http, response.code());
|
||||
Log.i(url,"接收:"+http);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void post(final String url, final JSONObject json, final HttpInterface httpInterface) {
|
||||
if(client==null){
|
||||
client=getClient();
|
||||
}
|
||||
Log.i("POST",url);
|
||||
Request request = new Request.Builder().url(url).post(mapToBody(json)).removeHeader("User-Agent").build();
|
||||
Call call = client.newCall(request);
|
||||
try {
|
||||
call.enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
if(httpInterface!=null)
|
||||
httpInterface.httpError(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) {
|
||||
try {
|
||||
String http=response.body().string();
|
||||
if(httpInterface!=null)
|
||||
httpInterface.httpGetData(http, response.code());
|
||||
Log.i(url,"传参:"+json.toString()+" 接收:"+http);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
public static void downloadFile(final String url, final String srcPath, final DownloadFileInerface downloadFileInerface){
|
||||
if(client==null)
|
||||
client=getClient();
|
||||
File path=new File(srcPath);
|
||||
if(!path.exists())
|
||||
path.mkdirs();
|
||||
Request request=new Request.Builder().url(url).build();
|
||||
client.newCall(request).enqueue(new Callback() {
|
||||
@Override
|
||||
public void onFailure(Call call, IOException e) {
|
||||
downloadFileInerface.over(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResponse(Call call, Response response) throws IOException {
|
||||
InputStream is = null;
|
||||
byte[] buf = new byte[2048];
|
||||
int len = 0;
|
||||
FileOutputStream fos = null;
|
||||
try {
|
||||
is = response.body().byteStream();
|
||||
long total = response.body().contentLength();
|
||||
File file = new File(srcPath, getNameFromUrl(url));
|
||||
fos = new FileOutputStream(file);
|
||||
long sum = 0;
|
||||
while ((len = is.read(buf)) != -1) {
|
||||
fos.write(buf, 0, len);
|
||||
sum += len;
|
||||
int progress = (int) (sum * 1.0f / total * 100);
|
||||
// 下载中
|
||||
while (!downloadFileInerface.downloading(getNameFromUrl(url),progress,total)){
|
||||
Thread.sleep(10);
|
||||
}
|
||||
|
||||
}
|
||||
fos.flush();
|
||||
// 下载完成
|
||||
downloadFileInerface.over(true);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
downloadFileInerface.over(false);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
private static String getNameFromUrl(String url) {
|
||||
return url.substring(url.lastIndexOf("/") + 1);
|
||||
}
|
||||
|
||||
public static String getHtml(String url){
|
||||
Log.i("获取网页源码:"+url);
|
||||
if(client==null)
|
||||
client=getClient();
|
||||
Request request=new Request.Builder().url(url).build();
|
||||
try {
|
||||
Response response= client.newCall(request).execute();
|
||||
return response.body().string();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "<html><body></body></html>";
|
||||
}
|
||||
|
||||
private static FormBody mapToBody(JSONObject json) {
|
||||
FormBody.Builder builder = new FormBody.Builder();
|
||||
if (json == null) {
|
||||
return builder.build();
|
||||
}
|
||||
Iterator<String> keys = json.keys();
|
||||
while (keys.hasNext()) {
|
||||
String key = keys.next();
|
||||
try {
|
||||
builder.add(key, json.get(key) + "");
|
||||
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
builder.add("token", AppData.Token);
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.yutou.jianrmg_v2.basemodel;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
|
||||
import Interfaces.BaseActivityInterface;
|
||||
import dalvik.system.DexClassLoader;
|
||||
|
||||
public class Test extends AppCompatActivity{
|
||||
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setTitle(R.string.app_name);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Tools;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.Context;
|
||||
|
||||
import java.util.Stack;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class ActivitysManager {
|
||||
private static Stack<Activity> activityStack = new Stack<Activity>();
|
||||
|
||||
/**
|
||||
* 添加Activity到堆栈
|
||||
*/
|
||||
public static void addActivity(Activity activity) {
|
||||
activityStack.push(activity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前Activity(堆栈中最后一个压入的)
|
||||
*/
|
||||
public static Activity currentActivity() {
|
||||
return activityStack.lastElement();
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束当前Activity(堆栈中最后一个压入的)
|
||||
*/
|
||||
public static void finishCurrentActivity() {
|
||||
Activity activity = activityStack.pop();
|
||||
activity.finish();
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束指定的Activity
|
||||
*/
|
||||
public static void finishActivity(Activity activity) {
|
||||
if (activity != null) {
|
||||
activityStack.remove(activity);
|
||||
if(!activity.isFinishing()) {
|
||||
activity.finish();
|
||||
}
|
||||
}
|
||||
if(activityStack.empty()){
|
||||
Log.i("Activity管理器","已清空");
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束指定类名的Activity
|
||||
*/
|
||||
public static void finishActivity(Class<?> cls) {
|
||||
for (Activity activity : activityStack) {
|
||||
if (activity.getClass().equals(cls)) {
|
||||
finishActivity(activity);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束所有Activity
|
||||
*/
|
||||
public static void finishAllActivity() {
|
||||
for (Activity activity : activityStack) {
|
||||
if (activity != null) {
|
||||
activity.finish();
|
||||
}
|
||||
}
|
||||
activityStack.clear();
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出应用程序
|
||||
*/
|
||||
public static void AppExit(Context context) {
|
||||
try {
|
||||
finishAllActivity();
|
||||
ActivityManager manager = (ActivityManager) context
|
||||
.getSystemService(Context.ACTIVITY_SERVICE);
|
||||
manager.killBackgroundProcesses(context.getPackageName());
|
||||
System.exit(0);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Tools;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.PrintWriter;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/18.
|
||||
*/
|
||||
|
||||
public class ConfigUtils {
|
||||
public static final String collection="collection";
|
||||
public static final String token="token";
|
||||
public static final String uid="uid";
|
||||
public static final String user="user";
|
||||
|
||||
private static ConfigUtils config;
|
||||
private static final String configPath="/data/data/com.yutou.jianrmg_v2/files/";
|
||||
private JSONObject json;
|
||||
public static ConfigUtils init(){
|
||||
if(config==null){
|
||||
config=new ConfigUtils();
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
public ConfigUtils() {
|
||||
json=read();
|
||||
}
|
||||
private JSONObject read(){
|
||||
File file=new File(configPath+"appConfig.json");
|
||||
if(file.exists()){
|
||||
try {
|
||||
BufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(file)));
|
||||
String tmp,str="";
|
||||
while ((tmp=reader.readLine())!=null){
|
||||
str+=tmp;
|
||||
}
|
||||
reader.close();
|
||||
return new JSONObject(str);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return initConfig();
|
||||
}else{
|
||||
try {
|
||||
new File(configPath).mkdirs();
|
||||
file.createNewFile();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return initConfig();
|
||||
}
|
||||
}
|
||||
private JSONObject initConfig(){
|
||||
JSONObject json=new JSONObject();
|
||||
try {
|
||||
json.put("token","");
|
||||
json.put("uid",0);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return json;
|
||||
}
|
||||
public boolean save(String key, Object value){
|
||||
try {
|
||||
File file=new File(configPath+"appConfig.json");
|
||||
if(!file.exists()){
|
||||
file.createNewFile();
|
||||
}
|
||||
json.put(key,value);
|
||||
PrintWriter writer=new PrintWriter(file);
|
||||
writer.println(json.toString());
|
||||
writer.flush();
|
||||
writer.close();
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public Object load(String key){
|
||||
try{
|
||||
return json.get(key);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public void printConfig(){
|
||||
Log.i("读取配置文件",json.toString());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Tools;
|
||||
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class Log {
|
||||
private static final boolean LOG=true;
|
||||
/**
|
||||
* 错误输出
|
||||
* @param str 正文
|
||||
*/
|
||||
public static void e(String str) {
|
||||
if(LOG)
|
||||
System.err.println(str);
|
||||
}
|
||||
/**
|
||||
* 普通输出
|
||||
* @param str 正文
|
||||
*/
|
||||
public static void i(String str) {
|
||||
if(LOG)
|
||||
System.out.println(str);
|
||||
}
|
||||
/**
|
||||
* 错误输出带标题
|
||||
* @param title 标题
|
||||
* @param str 正文
|
||||
*/
|
||||
public static void e(String title,String str) {
|
||||
if(LOG)
|
||||
System.err.println("["+title+"]"+str);
|
||||
}
|
||||
/**
|
||||
* 普通输出带标题
|
||||
* @param title 标题
|
||||
* @param str 正文
|
||||
*/
|
||||
public static void i(String title,String str) {
|
||||
if(LOG)
|
||||
System.out.println("["+title+"]"+str);
|
||||
|
||||
}
|
||||
/**
|
||||
* 异常输出
|
||||
* @param e 异常
|
||||
* @param object 异常所在的类
|
||||
* @return
|
||||
*/
|
||||
public static String printf_Error(Exception e,Object object) {
|
||||
StringWriter writer=new StringWriter();
|
||||
PrintWriter printWriter=new PrintWriter(writer);
|
||||
e.printStackTrace(printWriter);
|
||||
if(LOG)
|
||||
System.err.println("["+object.getClass().getName()+"]"+writer.toString());
|
||||
return "["+object.getClass().getName()+"]"+writer.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,351 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Tools;
|
||||
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.ServiceConnection;
|
||||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.view.View;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.TModfile;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.DownloadInterface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.basemodel.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.basemodel.services.DownloadService;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
import me.drakeet.materialdialog.MaterialDialog;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/2.
|
||||
*/
|
||||
|
||||
public class ModUtils {
|
||||
private static ModUtils modUtils;
|
||||
private Context context;
|
||||
private Handler handler;
|
||||
private List<TModfile> modfiles;
|
||||
private KProgressHUD hud;
|
||||
private TMod mod;
|
||||
public static ModUtils init(Context context){
|
||||
if(modUtils==null){
|
||||
modUtils=new ModUtils();
|
||||
}
|
||||
modUtils.setContext(context);
|
||||
return modUtils;
|
||||
}
|
||||
private void setContext(Context context){
|
||||
this.context=context;
|
||||
hud=Utils.showLoading(context,"安装中","请稍后");
|
||||
}
|
||||
private ModUtils(){
|
||||
handler=new Handler();
|
||||
}
|
||||
public void setMod(TMod mod){
|
||||
this.mod=mod;
|
||||
getModDownloadInfo();
|
||||
}
|
||||
public List<TModfile> getModfiles(){
|
||||
return modfiles;
|
||||
}
|
||||
public void installMod(TMod mod){
|
||||
this.mod=mod;
|
||||
install();
|
||||
}
|
||||
private void install(){
|
||||
if(modfiles==null){
|
||||
Toast.makeText(context,"正在加载数据,请稍后再试",Toast.LENGTH_LONG).show();
|
||||
getModDownloadInfo();
|
||||
return;
|
||||
}
|
||||
Log.i("安装mod",changeMod(mod,modfiles)+"");
|
||||
if(!isInstallMod(mod)&&changeMod(mod,modfiles)){
|
||||
install(mod);
|
||||
}else{
|
||||
if(getModPath(mod).listFiles().length>0&&!changeMod(mod,modfiles)){
|
||||
final MaterialDialog dialog=new MaterialDialog(context);
|
||||
dialog.setTitle("mod已损失");
|
||||
dialog.setMessage("当前mod文件有缺失,是否重新下载?");
|
||||
dialog.setPositiveButton("确定", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
downloadMod();
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.setNegativeButton("算了", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}else {
|
||||
downloadMod();
|
||||
}
|
||||
}
|
||||
}
|
||||
private void install(final TMod mod){
|
||||
List<String> clientList=new ArrayList<>();
|
||||
for (MGamePackname packname : AppData.packnames) {
|
||||
clientList.add(packname.getZhname()+"("+packname.getPackname()+")");
|
||||
}
|
||||
final MaterialDialog dialog=new MaterialDialog(context);
|
||||
dialog.setTitle("选择安装客户端");
|
||||
ListView listView=new ListView(context);
|
||||
listView.setAdapter(new ArrayAdapter<String>(context,android.R.layout.simple_list_item_1,clientList));
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
MGamePackname packname=AppData.packnames.get(i);
|
||||
hud.show();
|
||||
for (TModfile modfile : modfiles) {
|
||||
File file=getModPath(mod,modfile.getFilename());
|
||||
if(packname.getZhname().contains("[ROOT]")){
|
||||
backupOrRoot(file,"/data/data/"+packname.getPackname()+modfile.getInstallpathid(),packname.getPackname(),mod);
|
||||
rootInstall(file,"/data/data/"+packname.getPackname()+modfile.getInstallpathid());
|
||||
}else{
|
||||
|
||||
}
|
||||
}
|
||||
try {
|
||||
new File(getModInstallPath(mod)+packname.getPackname()+".lock").createNewFile();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
hud.dismiss();
|
||||
dialog.dismiss();
|
||||
Toast.makeText(context,"安装成功,重启游戏生效",Toast.LENGTH_LONG).show();
|
||||
}
|
||||
});
|
||||
dialog.setContentView(listView);
|
||||
dialog.setPositiveButton("放弃", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
private void notRootInstall(File src,String path){
|
||||
|
||||
}
|
||||
private void rootInstall(File src,String path){
|
||||
RootUtils root=RootUtils.init(context);
|
||||
if(RootUtils.su()){
|
||||
root.exec("\\cp -f "+src.getAbsolutePath()+" "+path);
|
||||
root.exec("chmod 777 "+src.getAbsolutePath()+" "+path+src.getName());
|
||||
}else {
|
||||
final MaterialDialog dialog=new MaterialDialog(context);
|
||||
dialog.setTitle("错误");
|
||||
dialog.setMessage("未获取到ROOT权限\n提示:魔改专用端可免ROOT使用魔改,以及更多功能");
|
||||
dialog.setPositiveButton("确定", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.setNegativeButton("下载魔改专用客户端", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
}
|
||||
public void reBackMod(TMod tMod) {
|
||||
final MaterialDialog dialog=new MaterialDialog(context);
|
||||
dialog.setTitle("将还原 "+tMod.getTitle());
|
||||
final List<String> clientList=getInstallClens();
|
||||
ListView listView=new ListView(context);
|
||||
listView.setAdapter(new ArrayAdapter<String>(context,android.R.layout.simple_list_item_1,clientList));
|
||||
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
RootUtils root=RootUtils.init(context);
|
||||
for (TModfile modfile : modfiles) {
|
||||
if(getModPath(mod,"backup/"+clientList.get(i)+"/"+modfile.getFilename()).exists()){
|
||||
root.exec("\\cp -f "+getModInstallPath(mod)+"backup/"+clientList.get(i)+"/"+modfile.getFilename()+" "+"/data/data/"+clientList.get(i)+modfile.getInstallpathid());
|
||||
}else{
|
||||
root.exec("rm -f "+"/data/data/"+clientList.get(i)+modfile.getInstallpathid()+modfile.getFilename());
|
||||
}
|
||||
}
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.dismiss();
|
||||
dialog.setNegativeButton("放弃", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
dialog.dismiss();;
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
|
||||
}
|
||||
private void backupOrRoot(File srcFile,String srcPath,String backupClient,TMod mod){
|
||||
RootUtils root = RootUtils.init(context);
|
||||
if(RootUtils.su()) {
|
||||
File backup = getModPath(mod, "backup/"+backupClient);
|
||||
File file=new File(backup.getAbsolutePath()+"/"+srcFile.getName());
|
||||
if(file.exists()){
|
||||
return;
|
||||
}
|
||||
if (!backup.exists()) {
|
||||
Log.i("获取ROOT","2");
|
||||
backup.mkdirs();
|
||||
}
|
||||
root.exec("chmod 777 "+srcPath+srcFile.getName());
|
||||
root.exec("\\cp -f"+srcPath+srcFile.getName()+" "+backup+"/");
|
||||
}else{
|
||||
}
|
||||
}
|
||||
private void downloadMod(){
|
||||
Toast.makeText(context,"开始下载",Toast.LENGTH_LONG).show();
|
||||
Intent intent=new Intent(context.getApplicationContext(), DownloadService.class);
|
||||
intent.setPackage(context.getPackageName());
|
||||
boolean isBindService=context.getApplicationContext().bindService(intent, new ServiceConnection() {
|
||||
@Override
|
||||
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
|
||||
DownloadService.ServiceBinder binder=(DownloadService.ServiceBinder)iBinder;
|
||||
DownloadService service=binder.getService(new DownloadInterface() {
|
||||
@Override
|
||||
public void getDownloadList(int size) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDownloadFile(TModfile modfile) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getDownloadFileSize(int size) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCurrent(int current) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void over() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void start() {
|
||||
|
||||
}
|
||||
});
|
||||
service.start(modfiles);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onServiceDisconnected(ComponentName componentName) {
|
||||
Log.i("下载服务","绑定失败:"+componentName);
|
||||
}
|
||||
},Context.BIND_AUTO_CREATE);
|
||||
Log.i("绑定下载:",isBindService+"");
|
||||
}
|
||||
private void getModDownloadInfo(){
|
||||
modfiles=null;
|
||||
try{
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("mid",mod.getId());
|
||||
json.put("uid", AppData.user.getId());
|
||||
HttpUtils.post(HttpApi.HOME_URL + HttpApi.MOD_DOWNLOAD, json, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
try{
|
||||
JSONObject json=new JSONObject(string);
|
||||
if(json.getInt("code")==100){
|
||||
modfiles= JSON.parseArray(json.getJSONArray("data").toString(),TModfile.class);
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static String getModInstallPath(TMod mod){
|
||||
return Utils.getSDCardPath()+"/"+mod.getId()+"/";
|
||||
}
|
||||
public static boolean isInstallMod(TMod mod){
|
||||
File modPath=new File(Utils.getSDCardPath()+"/"+mod.getId()+"/");
|
||||
for (int i = 0; i < modPath.listFiles().length; i++) {
|
||||
Log.i("检测mod是否安装","位置:"+modPath.listFiles()[i].getAbsolutePath()+" exists:"+modPath.listFiles()[i].exists()+" .lock="+(modPath.listFiles()[i].getName().contains(".lock")));
|
||||
if(modPath.listFiles()[i].getName().contains(".lock")){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public static boolean changeMod(TMod mod, List<TModfile> modfiles){
|
||||
File modPath=new File(Utils.getSDCardPath()+"/"+mod.getId()+"/");
|
||||
Log.i("检测mod是否完整","位置:"+Utils.getSDCardPath()+"/"+mod.getId()+"/"+" exists:"+modPath.exists());
|
||||
for (TModfile modfile : modfiles) {
|
||||
if(!new File(Utils.getSDCardPath()+"/"+mod.getId()+"/"+modfile.getFilename()).exists()){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public static File getModPath(TMod mod){
|
||||
return getModPath(mod,"");
|
||||
}
|
||||
public static File getModPath(TMod mod,String name){
|
||||
File path=new File(Utils.getSDCardPath()+"/"+mod.getId()+"/"+name);
|
||||
if(!path.exists()){
|
||||
path.mkdirs();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getInstallClens() {
|
||||
List<String> installClens=new ArrayList<>();
|
||||
File modPath=getModPath(mod);
|
||||
if(modPath.exists()){
|
||||
for (int i = 0; i < modPath.listFiles().length; i++) {
|
||||
if(modPath.listFiles()[i].getName().contains(".lock")){
|
||||
installClens.add(modPath.listFiles()[i].getName().split("\\.")[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return installClens;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Tools;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/2/6.
|
||||
*/
|
||||
|
||||
public class RootUtils {
|
||||
private Context context;
|
||||
private static RootUtils rootUtils;
|
||||
private Runtime localProcess;
|
||||
private Process process;
|
||||
private DataOutputStream stream;
|
||||
private int exitValue;
|
||||
public static RootUtils init(Context context){
|
||||
if(rootUtils==null){
|
||||
rootUtils=new RootUtils(context);
|
||||
rootUtils.init();
|
||||
}
|
||||
return rootUtils;
|
||||
}
|
||||
private void init(){
|
||||
try {
|
||||
localProcess = Runtime.getRuntime();
|
||||
process= localProcess.exec("su\n");
|
||||
stream=new DataOutputStream(process.getOutputStream());
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
private RootUtils(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
private static int isRoot=0;
|
||||
public static boolean su(){
|
||||
if(isRoot!=0){
|
||||
if(isRoot==1){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
try {
|
||||
Process localProcess = Runtime.getRuntime().exec("su\n");
|
||||
Object localObject = localProcess.getOutputStream();
|
||||
DataOutputStream localDataOutputStream = new DataOutputStream(
|
||||
(OutputStream) localObject);
|
||||
localDataOutputStream.writeBytes("echo test\n");
|
||||
localDataOutputStream.flush();
|
||||
localDataOutputStream.writeBytes("exit\n");
|
||||
localDataOutputStream.flush();
|
||||
int result =localProcess.waitFor();
|
||||
localDataOutputStream.close();
|
||||
localProcess.exitValue();
|
||||
if (result == 0) {
|
||||
isRoot=1;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
isRoot=-1;
|
||||
return false;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
isRoot=-1;
|
||||
return false;
|
||||
}
|
||||
public boolean exec(String exec){
|
||||
try {
|
||||
exec="./data/data/"+context.getPackageName()+"/files/busybox-armv6l "+exec;
|
||||
Log.i("ROOT",exec);
|
||||
stream.writeBytes(exec+"\n");
|
||||
stream.flush();
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public boolean println(String exec) {
|
||||
try {
|
||||
// exec="./data/data/"+context.getPackageName()+"/files/busybox-armv6l "+exec;
|
||||
exec="su\n"+exec;
|
||||
Log.i("ROOT",exec);
|
||||
Process process=localProcess.exec(exec+"\n");
|
||||
BufferedReader reader=new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String str="",tmp;
|
||||
List<String> list=new ArrayList<>();
|
||||
while ((tmp=reader.readLine())!=null){
|
||||
//str+=tmp;
|
||||
list.add(tmp);
|
||||
}
|
||||
reader.close();
|
||||
for (String string : list) {
|
||||
Log.i("ROOT get",string);
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.Tools;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.os.Environment;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.kaopiz.kprogresshud.KProgressHUD;
|
||||
import com.nostra13.universalimageloader.cache.disc.impl.UnlimitedDiskCache;
|
||||
import com.nostra13.universalimageloader.core.DisplayImageOptions;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.nostra13.universalimageloader.core.ImageLoaderConfiguration;
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/20.
|
||||
*/
|
||||
|
||||
public class Utils {
|
||||
public static int getPixelsFromDp(Activity activity, int size){
|
||||
DisplayMetrics metrics =new DisplayMetrics();
|
||||
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
|
||||
return(size * metrics.densityDpi) / DisplayMetrics.DENSITY_DEFAULT;
|
||||
}
|
||||
public static void toast(Context context,String str){
|
||||
Toast.makeText(context,str,Toast.LENGTH_LONG).show();
|
||||
}
|
||||
public static void setImmersion(Activity activity){
|
||||
activity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
|
||||
}
|
||||
|
||||
public static String getSDCardPath(){
|
||||
String path= Environment.getExternalStorageDirectory().getPath()+"/jianRMG";
|
||||
return path;
|
||||
}
|
||||
private static DisplayImageOptions initDisplayOptions(){
|
||||
DisplayImageOptions.Builder displayImageOptionsBuilder = new DisplayImageOptions.Builder();
|
||||
displayImageOptionsBuilder.cacheInMemory(false);
|
||||
displayImageOptionsBuilder.cacheOnDisk(true);
|
||||
displayImageOptionsBuilder.showImageForEmptyUri(R.drawable.ic_launcher_background);
|
||||
return displayImageOptionsBuilder.build();
|
||||
}
|
||||
public static ImageLoader initImageLoader(Context context){
|
||||
|
||||
ImageLoader imageLoader= ImageLoader.getInstance();
|
||||
ImageLoaderConfiguration.Builder builder=new ImageLoaderConfiguration.Builder(context);
|
||||
File cachePath=new File(getSDCardPath()+"/cache/");
|
||||
if(!cachePath.exists()){
|
||||
cachePath.exists();
|
||||
}
|
||||
//builder.memoryCache(new WeakMemoryCache());
|
||||
builder.diskCache(new UnlimitedDiskCache(cachePath));
|
||||
builder.defaultDisplayImageOptions(initDisplayOptions());
|
||||
|
||||
imageLoader.init(builder.build());
|
||||
return imageLoader;
|
||||
}
|
||||
public static <T> List<T> ListRemoveNull(List<T> list){
|
||||
list.removeAll(Collections.singleton(null));
|
||||
return list;
|
||||
}
|
||||
|
||||
public static KProgressHUD showLoading(Context context,String title,String text){
|
||||
if(text==null){
|
||||
text="载入中";
|
||||
}
|
||||
if(title==null){
|
||||
title="请稍后";
|
||||
}
|
||||
KProgressHUD hud = KProgressHUD.create(context)
|
||||
.setStyle(KProgressHUD.Style.SPIN_INDETERMINATE)
|
||||
.setLabel(title)
|
||||
.setDetailsLabel(text)
|
||||
.setCancellable(false)
|
||||
.setAnimationSpeed(2)
|
||||
.setDimAmount(0.5f);
|
||||
return hud;
|
||||
}
|
||||
public static boolean testStringIsNull(String... strings){
|
||||
for (String string : strings) {
|
||||
if(null==string||"".equals(string)||string.length()==0){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.services;
|
||||
|
||||
import android.app.Notification;
|
||||
import android.app.NotificationChannel;
|
||||
import android.app.NotificationManager;
|
||||
import android.app.PendingIntent;
|
||||
import android.app.Service;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.os.Binder;
|
||||
import android.os.IBinder;
|
||||
import android.widget.RemoteViews;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.TModfile;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.DownloadFileInerface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.DownloadInterface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.resmodl.R;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class DownloadService extends Service {
|
||||
private List<TModfile> list;
|
||||
private DownloadInterface downloadInterface;
|
||||
private NotificationManager notificationManager;
|
||||
private String BUTTON_CLICK="com.yutou.jianrmg.download.notification.button";
|
||||
private Download download;
|
||||
private RemoteViews views;
|
||||
private Notification notification;
|
||||
private boolean puase=false;
|
||||
public class ServiceBinder extends Binder{
|
||||
public DownloadService getService(DownloadInterface downloadInterface){
|
||||
DownloadService.this.downloadInterface=downloadInterface;
|
||||
return DownloadService.this;
|
||||
}
|
||||
}
|
||||
|
||||
public DownloadService() {
|
||||
list=new ArrayList<>();
|
||||
}
|
||||
|
||||
private ServiceBinder binder=new ServiceBinder();
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
// TODO: Return the communication channel to the service.
|
||||
return binder;
|
||||
}
|
||||
public void setFiles(List<TModfile> list){
|
||||
this.list=list;
|
||||
}
|
||||
public void setInterface(DownloadInterface downloadInterface){
|
||||
this.downloadInterface=downloadInterface;
|
||||
}
|
||||
|
||||
public int getDownloadList(){
|
||||
return list.size();
|
||||
}
|
||||
public void start(List<TModfile> addList){
|
||||
Log.i("启动下载服务");
|
||||
puase=false;
|
||||
list.addAll(addList);
|
||||
downloadInterface.start();
|
||||
download= new Download(this);
|
||||
|
||||
}
|
||||
public void pause(){
|
||||
puase=!puase;
|
||||
}
|
||||
private void startNotification(){
|
||||
IntentFilter filter=new IntentFilter();
|
||||
filter.addAction(BUTTON_CLICK);
|
||||
registerReceiver(receiver,filter);
|
||||
Intent intent=new Intent(BUTTON_CLICK);
|
||||
PendingIntent buttonIntent=PendingIntent.getBroadcast(this,1,intent,PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
|
||||
views=new RemoteViews(getPackageName(),R.layout.notification_download_layout);
|
||||
views.setTextViewText(R.id.title,"开始下载");
|
||||
views.setOnClickPendingIntent(R.id.button,buttonIntent);
|
||||
views.setImageViewResource(R.id.imageView, R.mipmap.ic_launcher);
|
||||
|
||||
notificationManager= (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
Notification.Builder builder=new Notification.Builder(getApplicationContext());
|
||||
builder.setTicker("开始下载");
|
||||
builder.setContentTitle("正在下载");
|
||||
builder.setContent(views);
|
||||
builder.setVisibility(Notification.VISIBILITY_PUBLIC);
|
||||
//通知栏显示图标
|
||||
builder.setSmallIcon(R.drawable.icon_download);
|
||||
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
NotificationChannel channel=new NotificationChannel("channel_1","Message",NotificationManager.IMPORTANCE_HIGH);
|
||||
builder.setChannelId(channel.getId());
|
||||
notificationManager.createNotificationChannel(channel);
|
||||
}
|
||||
|
||||
notification = builder.build();
|
||||
notification.flags |= Notification.FLAG_AUTO_CANCEL;
|
||||
notificationManager.notify(1,notification);
|
||||
Utils.toast(getApplicationContext(),"展示通知栏");
|
||||
}
|
||||
private BroadcastReceiver receiver=new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Log.i("点击按钮");
|
||||
puase=!puase;
|
||||
}
|
||||
};
|
||||
private class Download extends Thread{
|
||||
private Download download;
|
||||
private DownloadService service;
|
||||
private boolean isAlive=false,downloading=false;
|
||||
public Download(DownloadService service){
|
||||
download=this;
|
||||
download.init(service);
|
||||
}
|
||||
|
||||
private void init(DownloadService service){
|
||||
if(!download.isAlive||!download.isAlive()||!download.isInterrupted())
|
||||
{
|
||||
this.service=service;
|
||||
service.startNotification();
|
||||
start();
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void run() {
|
||||
super.run();
|
||||
isAlive=true;
|
||||
Log.i("准备下载");
|
||||
while (service.list.size()>0){
|
||||
if(downloading){
|
||||
continue;
|
||||
}
|
||||
Log.i("开始下载:"+(downloading));
|
||||
downloading=true;
|
||||
final TModfile modfile=service.list.get(service.list.size()-1);
|
||||
service.downloadInterface.getDownloadList(service.list.size());
|
||||
Log.i("下载地址",modfile.getServiceurl());
|
||||
HttpUtils.downloadFile(modfile.getServiceurl(), Utils.getSDCardPath() + "/" + modfile.getMid() + "/", new DownloadFileInerface() {
|
||||
@Override
|
||||
public boolean downloading(String fileName, int current, long length) {
|
||||
service.views.setTextViewText(R.id.title,"正在下载:"+modfile.getFilename()+"("+length/1024+"kb)");
|
||||
service.views.setProgressBar(R.id.progressBar, 100,current,false);
|
||||
if(service.puase){
|
||||
service.views.setTextViewText(R.id.button,"下载");
|
||||
}else{
|
||||
service.views.setTextViewText(R.id.button,"暂停");
|
||||
}
|
||||
service.notificationManager.notify(1,service.notification);
|
||||
if(service.puase){
|
||||
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void over(boolean isOver) {
|
||||
if(isOver){
|
||||
service.list.remove(modfile);
|
||||
}
|
||||
downloading=false;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
service.views.setTextViewText(R.id.title,"全部下载完成");
|
||||
service.views.setProgressBar(R.id.progressBar,10,10,false);
|
||||
service.notificationManager.notify(1,service.notification);
|
||||
service.downloadInterface.over();
|
||||
isAlive=false;
|
||||
Log.i("下载结束");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import Interfaces.BaseActivityInterface;
|
||||
import dalvik.system.DexClassLoader;
|
||||
|
||||
public class BaseActivity extends AppCompatActivity {
|
||||
private BaseActivityInterface activityInterface;
|
||||
private LinearLayout main_layut;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_base);
|
||||
setTitle(R.string.app_name);
|
||||
main_layut=findViewById(R.id.main_layut);
|
||||
String baseActivityName=getIntent().getStringExtra("activityName");
|
||||
String jar=getIntent().getStringExtra("jar");
|
||||
DexClassLoader dexClassLoader= AppData.plugsin.get(jar);
|
||||
try {
|
||||
activityInterface= (BaseActivityInterface) dexClassLoader.loadClass(baseActivityName).newInstance();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
activityInterface.onCreate(savedInstanceState,main_layut,this,getIntent());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onRestart() {
|
||||
activityInterface.onRestart();
|
||||
super.onRestart();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
activityInterface.onPause();
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
activityInterface.onResume();
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
boolean tmp=activityInterface.onKeyDown(keyCode,event);
|
||||
if(tmp){
|
||||
return tmp;
|
||||
}
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||
boolean tmp=activityInterface.onKeyUp(keyCode, event);
|
||||
if(tmp) {
|
||||
return tmp;
|
||||
}
|
||||
return super.onKeyUp(keyCode,event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
boolean tmp=activityInterface.onTouchEvent(event);
|
||||
if(tmp)
|
||||
return tmp;
|
||||
return super.onTouchEvent(event);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
activityInterface.onDestroy();
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.views;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.SConfig;
|
||||
import com.yutou.jianrmg_v2.basemodel.Data.User;
|
||||
import com.yutou.jianrmg_v2.basemodel.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.basemodel.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.basemodel.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.ConfigUtils;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Utils;
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/1/18.
|
||||
*/
|
||||
|
||||
public class LoadingActivity extends AppCompatActivity {
|
||||
private LinearLayout loginLayout;
|
||||
private Button login,reg;
|
||||
private TextView notlogin,uname,password;
|
||||
private ImageView icon;
|
||||
private Handler handler;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_loading);
|
||||
Utils.setImmersion(this);
|
||||
handler=new Handler();
|
||||
initViews();
|
||||
initData();
|
||||
|
||||
}
|
||||
private void login(String name, String pass){
|
||||
try{
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("uname",name);
|
||||
json.put("pass",pass);
|
||||
HttpUtils.post(HttpApi.HOME_URL + HttpApi.USER_LOGIN, json, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
try{
|
||||
JSONObject json=new JSONObject(string);
|
||||
if(json.getInt("code")==100){
|
||||
AppData.user=JSON.parseObject(json.getJSONObject("data").toString(),User.class);
|
||||
AppData.Token=json.getString("token");
|
||||
ConfigUtils.init().save(ConfigUtils.token,AppData.Token);
|
||||
ConfigUtils.init().save(ConfigUtils.uid,AppData.user.getId());
|
||||
start();
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
private void initData(){
|
||||
/* if(RootUtils.su()) {
|
||||
RootUtils root = RootUtils.init(this);
|
||||
root.exec("cp /sdcard/jianRMG/1/aaa.txt /data/data/com.huanmeng.zhanjian2/");
|
||||
root.exec("cp /sdcard/jianRMG/1/aaa.txt /data/data/com.huanmeng.zhanjian2/files/");
|
||||
root.exec("mkdir /data/data/com.huanmeng.zhanjian2/files/bbb/");
|
||||
}else{
|
||||
Log.i("获取ROOT失败");
|
||||
}*/
|
||||
|
||||
initGamePackName();
|
||||
initConfig();
|
||||
initUser();
|
||||
|
||||
}
|
||||
private void initConfig(){
|
||||
try{
|
||||
HttpUtils.get(HttpApi.HOME_URL + HttpApi.MG_CONFIG, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
try {
|
||||
JSONObject json=new JSONObject(string);
|
||||
if(json!=null&&json.getInt("code")==100){
|
||||
AppData.appConfig=JSON.parseObject(json.getJSONObject("data").toString(), SConfig.class);
|
||||
}
|
||||
ready(1);
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
private void initGamePackName(){
|
||||
try{
|
||||
HttpUtils.get(HttpApi.HOME_URL + HttpApi.MOD_GAME_PACKNAME, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
try {
|
||||
Log.i(HttpApi.MOD_GAME_PACKNAME,string);
|
||||
JSONObject json=new JSONObject(string);
|
||||
AppData.packnames= JSON.parseArray(json.getJSONArray("data").toString(), MGamePackname.class);
|
||||
ready(1);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
private void initUser(){
|
||||
try {
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("token",AppData.Token);
|
||||
json.put("uid",AppData.user.getId());
|
||||
HttpUtils.post(HttpApi.HOME_URL + HttpApi.USER_TEST, json, new HttpInterface() {
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
try{
|
||||
JSONObject json=new JSONObject(string);
|
||||
if(json.getInt("code")==100){
|
||||
JSONObject data=json.getJSONObject("data").getJSONObject("data");
|
||||
AppData.user=JSON.parseObject(data.getJSONObject("user").toString(),User.class);
|
||||
ConfigUtils.init().save(ConfigUtils.collection,data.getJSONArray("collection"));
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
ready(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void httpError(Exception e) {
|
||||
ready(1);
|
||||
}
|
||||
});
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private void initViews(){
|
||||
loginLayout=findViewById(R.id.loginLayout);
|
||||
login=findViewById(R.id.login);
|
||||
notlogin=findViewById(R.id.notlogin);
|
||||
icon=findViewById(R.id.icon);
|
||||
uname=findViewById(R.id.uname);
|
||||
password=findViewById(R.id.password);
|
||||
|
||||
notlogin.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
start();
|
||||
}
|
||||
});
|
||||
login.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
String name=uname.getText().toString();
|
||||
String pass=password.getText().toString();
|
||||
if(Utils.testStringIsNull(name,pass)){
|
||||
Utils.toast(LoadingActivity.this,"账号/密码 不能为空");
|
||||
return;
|
||||
}
|
||||
login(name,pass);
|
||||
}
|
||||
});
|
||||
}
|
||||
public void start(){
|
||||
Intent intent=new Intent(LoadingActivity.this,MainActivity.class);
|
||||
startActivity(intent);
|
||||
}
|
||||
private void showLogin(){
|
||||
Animation iconAnim= AnimationUtils.loadAnimation(this,R.anim.loading_icon);
|
||||
Animation loginAnim=AnimationUtils.loadAnimation(this,R.anim.loading_login);
|
||||
iconAnim.setAnimationListener(new MyAnimListener());
|
||||
loginAnim.setAnimationListener(new MyAnimListener());
|
||||
icon.startAnimation(iconAnim);
|
||||
loginLayout.setAlpha(0f);
|
||||
loginLayout.setVisibility(View.VISIBLE);
|
||||
loginLayout.startAnimation(loginAnim);
|
||||
|
||||
}
|
||||
private class MyAnimListener implements Animation.AnimationListener{
|
||||
|
||||
@Override
|
||||
public void onAnimationStart(Animation animation) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animation animation) {
|
||||
loginLayout.setAlpha(1f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationRepeat(Animation animation) {
|
||||
|
||||
}
|
||||
}
|
||||
private int readys=0;
|
||||
private void ready(int i){
|
||||
readys+=i;
|
||||
if(readys==3){
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(Utils.testStringIsNull(AppData.Token)){
|
||||
showLogin();
|
||||
}else{
|
||||
start();
|
||||
}
|
||||
|
||||
}
|
||||
},0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.views;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.Adapters.ViewPagerAdapter;
|
||||
import com.yutou.jianrmg_v2.basemodel.Fragments.GameData;
|
||||
import com.yutou.jianrmg_v2.basemodel.Fragments.Home;
|
||||
import com.yutou.jianrmg_v2.basemodel.Fragments.MGList;
|
||||
import com.yutou.jianrmg_v2.basemodel.Fragments.My;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.ActivitysManager;
|
||||
import me.majiajie.pagerbottomtabstrip.NavigationController;
|
||||
import me.majiajie.pagerbottomtabstrip.PageNavigationView;
|
||||
import me.majiajie.pagerbottomtabstrip.listener.OnTabItemSelectedListener;
|
||||
|
||||
public class MainActivity extends AppCompatActivity {
|
||||
|
||||
private PageNavigationView tab;
|
||||
private ViewPager viewPager;
|
||||
private NavigationController navigationController;
|
||||
private List<Fragment> list;
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_main);
|
||||
ActivitysManager.finishActivity(LoadingActivity.class);
|
||||
initViews();
|
||||
}
|
||||
|
||||
private void initViews() {
|
||||
tab = findViewById(R.id.tab);
|
||||
viewPager = findViewById(R.id.pager);
|
||||
list=new ArrayList<>();
|
||||
list.add(Home.init(this));
|
||||
list.add(GameData.init(this));
|
||||
list.add(MGList.init(this));
|
||||
list.add(My.init());
|
||||
|
||||
ViewPagerAdapter adapter=new ViewPagerAdapter(getSupportFragmentManager(),list);
|
||||
viewPager.setAdapter(adapter);
|
||||
viewPager.setCurrentItem(0);
|
||||
navigationController = tab.material()
|
||||
.addItem(R.drawable.icon_home, R.drawable.icon_home_select, "主页")
|
||||
.addItem(R.drawable.icon_data, R.drawable.icon_data_select, "数据")
|
||||
.addItem(R.drawable.icon_mg, R.drawable.icon_mg_select, "魔改")
|
||||
.addItem(R.drawable.icon_my, R.drawable.icon_my_select, "个人中心")
|
||||
.build();
|
||||
navigationController.addTabItemSelectedListener(new OnTabItemSelectedListener() {
|
||||
@Override
|
||||
public void onSelected(int index, int old) {
|
||||
switch (index) {
|
||||
}
|
||||
viewPager.setCurrentItem(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRepeat(int index) {
|
||||
|
||||
}
|
||||
});
|
||||
navigationController.setupWithViewPager(viewPager);
|
||||
navigationController.setSelect(0);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.yutou.jianrmg_v2.basemodel.views;
|
||||
|
||||
import android.net.http.SslError;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
|
||||
import com.yutou.jianrmg_v2.basemodel.R;
|
||||
import com.yutou.jianrmg_v2.basemodel.Tools.Log;
|
||||
|
||||
|
||||
/**
|
||||
* Created by 58381 on 2018/3/14.
|
||||
*/
|
||||
|
||||
public class WebActivity extends AppCompatActivity{
|
||||
private WebView webView;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_web);
|
||||
initView();
|
||||
initWeb();
|
||||
String url=getIntent().getStringExtra("url");
|
||||
if(url==null)
|
||||
url="http://www.jianrmod.cn";
|
||||
Log.i("网页URL",url);
|
||||
webView.loadUrl(url);
|
||||
}
|
||||
private void initView(){
|
||||
webView=findViewById(R.id.webView);
|
||||
}
|
||||
private void initWeb(){
|
||||
WebSettings settings = webView.getSettings();
|
||||
settings.setJavaScriptEnabled(true);
|
||||
settings.setUseWideViewPort(true);
|
||||
settings.setAppCacheEnabled(true);
|
||||
settings.setRenderPriority(WebSettings.RenderPriority.HIGH);
|
||||
webView.setWebViewClient(new WebViewClient() {
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
|
||||
super.onReceivedSslError(view, handler, error);
|
||||
handler.proceed();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageFinished(WebView view, String url) {
|
||||
super.onPageFinished(view, url);
|
||||
Log.i("加载完成",url);
|
||||
WebActivity.this.setTitle(view.getTitle());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {
|
||||
Log.i("即将打开1" + request.getUrl());
|
||||
return super.shouldOverrideUrlLoading(view, request);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
10
BaseModel/src/main/res/anim/loading_icon.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fillAfter="true"
|
||||
android:fillBefore="false"
|
||||
android:duration="2000">
|
||||
<translate
|
||||
android:toYDelta="-10%p"
|
||||
/>
|
||||
|
||||
</set>
|
||||
8
BaseModel/src/main/res/anim/loading_login.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:fillAfter="true"
|
||||
android:duration="2000">
|
||||
<alpha
|
||||
android:toAlpha="1"
|
||||
/>
|
||||
</set>
|
||||
34
BaseModel/src/main/res/menu/mod_menu.xml
Normal file
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/admin"
|
||||
android:title="管理员">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/audit"
|
||||
android:title="审核">
|
||||
<menu>
|
||||
<item
|
||||
android:id="@+id/audit_ok"
|
||||
android:title="通过" />
|
||||
<item
|
||||
android:id="@+id/audit_no"
|
||||
android:title="不通过" />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/move"
|
||||
android:title="移动到.." />
|
||||
</menu>
|
||||
</item>
|
||||
|
||||
<item
|
||||
android:id="@+id/collection"
|
||||
android:title="收藏" />
|
||||
<item
|
||||
android:id="@+id/download"
|
||||
android:title="下载" />
|
||||
</menu>
|
||||
5
BaseModel/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
BIN
BaseModel/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
BaseModel/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
BaseModel/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
BaseModel/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
BaseModel/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
BaseModel/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
BaseModel/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
BaseModel/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
BaseModel/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
BaseModel/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
4
BaseModel/src/main/res/values-za-rCN/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">魔改宝盒</string>
|
||||
</resources>
|
||||
8
BaseModel/src/main/res/values/colors.xml
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
<color name="colorAictvictBack">#f0f0f0</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
</resources>
|
||||
3
BaseModel/src/main/res/values/dimens.xml
Normal file
@@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<dimen name="fab_margin">16dp</dimen>
|
||||
</resources>
|
||||
4
BaseModel/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">魔改宝盒</string>
|
||||
<string name="title_activity_base">BaseActivity</string>
|
||||
</resources>
|
||||
21
BaseModel/src/main/res/values/styles.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<resources>
|
||||
|
||||
<!-- Base application theme. -->
|
||||
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
<item name="colorPrimary">@color/colorPrimary</item>
|
||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||
<item name="colorAccent">@color/colorAccent</item>
|
||||
<item name="android:windowBackground">@color/colorAictvictBack</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.NoActionBar">
|
||||
<item name="windowActionBar">false</item>
|
||||
<item name="windowNoTitle">true</item>
|
||||
</style>
|
||||
|
||||
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
|
||||
|
||||
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
|
||||
|
||||
</resources>
|
||||