日常备份,下载列表已做好
This commit is contained in:
@@ -1,24 +1,39 @@
|
||||
package com.yutou.jianrmg_v2.Adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.support.v7.widget.AppCompatButton;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Interfaces.ModInterface;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.views.ModActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import me.drakeet.materialdialog.MaterialDialog;
|
||||
|
||||
public class DownloadItemAdapter extends BaseAdapter {
|
||||
private Context context;
|
||||
private List<?> list;
|
||||
private List<TMod> list;
|
||||
private ImageLoader imageLoader;
|
||||
|
||||
public DownloadItemAdapter(Context context, List<?> list) {
|
||||
public DownloadItemAdapter(Context context, List<TMod> list) {
|
||||
this.context = context;
|
||||
this.list = list;
|
||||
imageLoader= Utils.initImageLoader(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -37,20 +52,66 @@ public class DownloadItemAdapter extends BaseAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(int i, View view, ViewGroup viewGroup) {
|
||||
public View getView(final int i, View view, ViewGroup viewGroup) {
|
||||
Items items;
|
||||
if(view==null){
|
||||
view= LayoutInflater.from(context).inflate(R.layout.item_download,null);
|
||||
items=new Items();
|
||||
|
||||
items.delete=view.findViewById(R.id.delete);
|
||||
items.install=view.findViewById(R.id.install);
|
||||
items.icon=view.findViewById(R.id.image);
|
||||
items.title=view.findViewById(R.id.title);
|
||||
view.setTag(items);
|
||||
}else{
|
||||
items= (Items) view.getTag();
|
||||
}
|
||||
items.title.setText(list.get(i).getTitle());
|
||||
imageLoader.displayImage(AppData.appConfig.getDownloadhome()+list.get(i).getIcon(),items.icon);
|
||||
items.delete.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
final MaterialDialog dialog=new MaterialDialog(context);
|
||||
dialog.setTitle("提示");
|
||||
dialog.setMessage("删除这个内容?");
|
||||
dialog.setNegativeButton("我手滑了", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.setPositiveButton("是的", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Utils.deleteFiles(Utils.getAppPath()+"/"+list.get(i).getId());
|
||||
Utils.toast(context,"删除完成");
|
||||
list.remove(i);
|
||||
notifyDataSetChanged();
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
dialog.show();
|
||||
}
|
||||
});
|
||||
items.install.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
ModUtils mod=ModUtils.init(context);
|
||||
mod.installMod(list.get(i), null);
|
||||
}
|
||||
});
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
Intent intent=new Intent(context, ModActivity.class);
|
||||
intent.putExtra("mod", JSON.toJSONString(list.get(i)));
|
||||
context.startActivity(intent);
|
||||
}
|
||||
});
|
||||
return view;
|
||||
}
|
||||
private class Items{
|
||||
ImageView icon;
|
||||
TextView title;
|
||||
Button install,delete;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class Home extends Fragment {
|
||||
endText.setText(" --已经没有了--");
|
||||
adapter.setFooter(endText);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setRefreshAction(new Action() {
|
||||
recyclerView.addRefreshAction(new Action() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
min=0;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class MGList extends Fragment {
|
||||
endText.setText(" --已经没有了--");
|
||||
adapter.setFooter(endText);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setRefreshAction(new Action() {
|
||||
recyclerView.addRefreshAction(new Action() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
min=0;
|
||||
|
||||
@@ -71,7 +71,7 @@ public class ModListFragmentData {
|
||||
endText.setText(" --已经没有了--");
|
||||
adapter.setFooter(endText);
|
||||
recyclerView.setAdapter(adapter);
|
||||
recyclerView.setRefreshAction(new Action() {
|
||||
recyclerView.addRefreshAction(new Action() {
|
||||
@Override
|
||||
public void onAction() {
|
||||
min=0;
|
||||
|
||||
@@ -5,8 +5,8 @@ package com.yutou.jianrmg_v2.Network;
|
||||
*/
|
||||
|
||||
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://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";
|
||||
|
||||
@@ -77,6 +77,7 @@ public class HttpUtils {
|
||||
if(httpInterface!=null)
|
||||
httpInterface.httpError(e);
|
||||
e.printStackTrace();
|
||||
Log.e(e,HttpUtils.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Log {
|
||||
* @param object 异常所在的类
|
||||
* @return
|
||||
*/
|
||||
public static String printf_Error(Exception e,Object object) {
|
||||
public static String e(Exception e,Object object) {
|
||||
StringWriter writer=new StringWriter();
|
||||
PrintWriter printWriter=new PrintWriter(writer);
|
||||
e.printStackTrace(printWriter);
|
||||
|
||||
@@ -85,6 +85,10 @@ public class ModUtils {
|
||||
|
||||
public void installMod(TMod mod, ModInterface modInterface) {
|
||||
this.mod = mod;
|
||||
if(modfiles!=null&&modfiles.size()>0&&!mod.getId().equals(modfiles.get(0).getMid())){
|
||||
modfiles.clear();
|
||||
getModDownloadInfo();
|
||||
}
|
||||
if (modInterface == null) {
|
||||
modInterface = new ModInterface() {
|
||||
@Override
|
||||
@@ -102,9 +106,11 @@ public class ModUtils {
|
||||
getModDownloadInfo();
|
||||
return;
|
||||
}
|
||||
Log.i("安装mod", changeMod(mod, modfiles) + "");
|
||||
if (!isInstallMod(mod) && changeMod(mod, modfiles)) {
|
||||
Log.i("安装mod", isInstallMod(mod) + " " + changeMod(mod, modfiles));
|
||||
if (changeMod(mod, modfiles) && !isInstallMod(mod)) {
|
||||
install(mod, modInterface);
|
||||
} else if (isInstallMod(mod)) {
|
||||
reBackMod(mod, modInterface);
|
||||
} else {
|
||||
if (getModPath(mod).listFiles().length > 0 && !changeMod(mod, modfiles)) {
|
||||
final MaterialDialog dialog = new MaterialDialog(context);
|
||||
@@ -190,7 +196,7 @@ public class ModUtils {
|
||||
}
|
||||
hud.dismiss();
|
||||
dialog.dismiss();
|
||||
Toast.makeText(context, "安装成功,重启游戏生效", Toast.LENGTH_LONG).show();
|
||||
Utils.toast(context, "安装成功,重启游戏生效");
|
||||
modInterface.onAction(true, MOD_INSTALL);
|
||||
}
|
||||
});
|
||||
@@ -198,6 +204,7 @@ public class ModUtils {
|
||||
dialog.setPositiveButton("放弃", new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
modInterface.onAction(false,MOD_INSTALL);
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
@@ -218,15 +225,15 @@ public class ModUtils {
|
||||
private boolean rootInstall(File src, String path) {
|
||||
RootUtils root = RootUtils.init(context);
|
||||
if (RootUtils.su()) {
|
||||
File tmpFile=new File("/data/data/"+context.getPackageName()+"/mods/");
|
||||
if(!tmpFile.getParentFile().exists())
|
||||
File tmpFile = new File("/data/data/" + context.getPackageName() + "/mods/");
|
||||
if (!tmpFile.getParentFile().exists())
|
||||
tmpFile.getParentFile().mkdirs();
|
||||
if(tmpFile.exists())
|
||||
if (tmpFile.exists())
|
||||
tmpFile.delete();
|
||||
Utils.copyFile(src.getAbsolutePath(),tmpFile.getAbsolutePath(),true);
|
||||
root.exec("mkdir -p "+path);
|
||||
root.exec("cp -f " + tmpFile.getAbsolutePath()+"/"+src.getName() + " " + path);
|
||||
root.exec("chmod 777 " + path + src.getName());
|
||||
Utils.copyFile(src.getAbsolutePath(), tmpFile.getAbsolutePath(), true);
|
||||
root.exec("mkdir -p " + path);
|
||||
root.exec("cp -f " + tmpFile.getAbsolutePath() + "/" + src.getName() + " " + path);
|
||||
root.exec("chmod 777 " + path + src.getName());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -267,6 +274,7 @@ public class ModUtils {
|
||||
if (modInterface != null)
|
||||
modInterface.onAction(true, MOD_UNINSTALL);
|
||||
dialog.dismiss();
|
||||
Utils.toast(context,"还原成功,重启游戏生效");
|
||||
}
|
||||
});
|
||||
dialog.setContentView(listView);
|
||||
@@ -295,14 +303,14 @@ public class ModUtils {
|
||||
Log.i("获取ROOT", "2");
|
||||
backup.mkdirs();
|
||||
}
|
||||
File tmpFile=new File("/data/data/"+context.getPackageName()+"/mods/"+srcFile.getName());
|
||||
if(tmpFile.exists())
|
||||
File tmpFile = new File("/data/data/" + context.getPackageName() + "/mods/" + srcFile.getName());
|
||||
if (tmpFile.exists())
|
||||
tmpFile.delete();
|
||||
tmpFile.getParentFile().mkdirs();
|
||||
root.exec("mkdir -p "+srcPath);
|
||||
root.exec("mkdir -p " + srcPath);
|
||||
root.exec("chmod 7777 " + srcPath + srcFile.getName());
|
||||
root.exec("cp -f " + srcPath + srcFile.getName() + " " + tmpFile);
|
||||
root.println("cp -f "+tmpFile.getAbsolutePath()+" "+backup.getAbsolutePath());
|
||||
root.println("cp -f " + tmpFile.getAbsolutePath() + " " + backup.getAbsolutePath());
|
||||
} else {
|
||||
}
|
||||
}
|
||||
@@ -406,8 +414,8 @@ public class ModUtils {
|
||||
public static boolean changeMod(TMod mod, List<TModfile> modfiles) {
|
||||
for (TModfile modfile : modfiles) {
|
||||
if (!new File(Utils.getAppPath() + "/" + mod.getId() + "/" + modfile.getFilename()).exists()) {
|
||||
Log.i(TAG,"mod不完整:"+Utils.getAppPath() + "/" + mod.getId() + "/" + modfile.getFilename());
|
||||
Log.i(TAG,JSON.toJSONString(modfile));
|
||||
Log.i(TAG, "mod不完整:" + Utils.getAppPath() + "/" + mod.getId() + "/" + modfile.getFilename());
|
||||
Log.i(TAG, JSON.toJSONString(modfile));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,10 +141,10 @@ public class Utils {
|
||||
// 判断目标文件是否存在
|
||||
File destFile = new File(destFileName);
|
||||
// 如果目标文件所在目录不存在,则创建目录
|
||||
Log.i(TAG,"目标文件夹:"+destFileName+" exists:"+destFile.exists());
|
||||
Log.i(TAG, "目标文件夹:" + destFileName + " exists:" + destFile.exists());
|
||||
if (!destFile.exists()) {
|
||||
// 目标文件所在目录不存在
|
||||
Log.i(TAG,"目标文件所在目录不存在"+destFile.getAbsolutePath());
|
||||
Log.i(TAG, "目标文件所在目录不存在" + destFile.getAbsolutePath());
|
||||
if (!destFile.mkdirs()) {
|
||||
// 复制文件失败:创建目标文件所在目录失败
|
||||
Log.i(TAG, " 复制文件失败:创建目标文件所在目录失败:" + destFileName);
|
||||
@@ -160,7 +160,7 @@ public class Utils {
|
||||
|
||||
try {
|
||||
in = new FileInputStream(srcFile);
|
||||
out = new FileOutputStream(destFile+"/"+srcFile.getName());
|
||||
out = new FileOutputStream(destFile + "/" + srcFile.getName());
|
||||
byte[] buffer = new byte[1024];
|
||||
|
||||
while ((byteread = in.read(buffer)) != -1) {
|
||||
@@ -184,13 +184,14 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
}
|
||||
public static boolean writerFile(String srcFile,String data){
|
||||
File file=new File(srcFile);
|
||||
if(!file.exists()){
|
||||
return false;
|
||||
|
||||
public static boolean writerFile(String srcFile, String data) {
|
||||
File file = new File(srcFile);
|
||||
if (!file.exists()) {
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
PrintWriter writer=new PrintWriter(file);
|
||||
PrintWriter writer = new PrintWriter(file);
|
||||
writer.write(data);
|
||||
writer.flush();
|
||||
writer.close();
|
||||
@@ -200,16 +201,17 @@ public class Utils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static String readFile(String srcFile){
|
||||
File file=new File(srcFile);
|
||||
if(!file.exists()){
|
||||
return null;
|
||||
|
||||
public static String readFile(String srcFile) {
|
||||
File file = new File(srcFile);
|
||||
if (!file.exists()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
BufferedReader reader=new BufferedReader(new FileReader(file));
|
||||
String tmp,str="";
|
||||
while ((tmp=reader.readLine())!=null){
|
||||
str+=tmp;
|
||||
BufferedReader reader = new BufferedReader(new FileReader(file));
|
||||
String tmp, str = "";
|
||||
while ((tmp = reader.readLine()) != null) {
|
||||
str += tmp;
|
||||
}
|
||||
return str;
|
||||
} catch (Exception e) {
|
||||
@@ -217,4 +219,16 @@ public class Utils {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void deleteFiles(String path) {
|
||||
File files = new File(path);
|
||||
if (files.exists()) {
|
||||
if (files.isDirectory()) {
|
||||
for (File file : files.listFiles()) {
|
||||
deleteFiles(file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
files.delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.yutou.jianrmg_v2.views;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
@@ -12,9 +13,14 @@ import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.ListView;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.yutou.jianrmg_v2.Adapters.DownloadItemAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
import com.yutou.jianrmg_v2.Network.HttpApi;
|
||||
import com.yutou.jianrmg_v2.Network.HttpUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
import com.yutou.jianrmg_v2.R;
|
||||
|
||||
@@ -24,20 +30,21 @@ import org.json.JSONObject;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import Interfaces.BaseActivityInterface;
|
||||
|
||||
public class DownloadListActivity extends AppCompatActivity {
|
||||
private Context context;
|
||||
private ListView listView;
|
||||
|
||||
|
||||
private List<TMod> mods;
|
||||
private Handler handler;
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_download_list);
|
||||
this.context = this;
|
||||
|
||||
handler=new Handler();
|
||||
getDownloadFileList();
|
||||
initViews();
|
||||
}
|
||||
@@ -50,7 +57,7 @@ public class DownloadListActivity extends AppCompatActivity {
|
||||
if (path.isDirectory()){
|
||||
try {
|
||||
array.put(Integer.valueOf(path.getName())+"");
|
||||
}catch (Exception e){}
|
||||
}catch (Exception e){ }
|
||||
}
|
||||
}
|
||||
json.put("ids",array);
|
||||
@@ -62,8 +69,13 @@ public class DownloadListActivity extends AppCompatActivity {
|
||||
if(json.getInt("code")!=100){
|
||||
return;
|
||||
}
|
||||
JSONArray dataList=json.getJSONArray("data");
|
||||
|
||||
mods= JSON.parseArray(json.getJSONArray("data").toString(),TMod.class);
|
||||
handler.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
listView.setAdapter(new DownloadItemAdapter(context,mods));
|
||||
}
|
||||
});
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.yutou.jianrmg_v2.views;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
|
||||
public class FavoritesActivity extends AppCompatActivity {
|
||||
@Override
|
||||
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,6 @@ import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.widget.Button;
|
||||
import android.widget.FrameLayout;
|
||||
@@ -22,6 +19,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.nostra13.universalimageloader.core.ImageLoader;
|
||||
import com.yutou.jianrmg_v2.Adapters.ReModListAdapter;
|
||||
import com.yutou.jianrmg_v2.Data.AppData;
|
||||
import com.yutou.jianrmg_v2.Data.MGamePackname;
|
||||
import com.yutou.jianrmg_v2.Data.TMod;
|
||||
import com.yutou.jianrmg_v2.Data.TModtag;
|
||||
import com.yutou.jianrmg_v2.Interfaces.HttpInterface;
|
||||
@@ -32,16 +30,15 @@ import com.yutou.jianrmg_v2.R;
|
||||
import com.yutou.jianrmg_v2.Tools.Log;
|
||||
import com.yutou.jianrmg_v2.Tools.ModUtils;
|
||||
import com.yutou.jianrmg_v2.Tools.Utils;
|
||||
|
||||
import com.zzhoujay.richtext.RichText;
|
||||
import com.zzhoujay.richtext.RichType;
|
||||
import com.zzhoujay.richtext.ig.DefaultImageGetter;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import Interfaces.BaseActivityInterface;
|
||||
import cn.droidlover.xrichtext.XRichText;
|
||||
|
||||
|
||||
/**
|
||||
@@ -51,8 +48,7 @@ import cn.droidlover.xrichtext.XRichText;
|
||||
public class ModActivity extends AppCompatActivity{
|
||||
private TMod tMod;
|
||||
private ImageView modImage, icon, collection_img;
|
||||
private TextView title, by, downloadText;
|
||||
private XRichText richText;
|
||||
private TextView title, by, downloadText,richText;
|
||||
private LinearLayout tagsLayout;
|
||||
private FrameLayout collection, share, download;
|
||||
private ListView quote;
|
||||
@@ -107,24 +103,26 @@ public class ModActivity extends AppCompatActivity{
|
||||
}
|
||||
|
||||
private void initData(final TMod tMod) {
|
||||
List<MGamePackname> installClick=modUtils.getInstallClens();
|
||||
System.out.println("---------->"+AppData.appConfig.getDownloadhome() + tMod.getImage());
|
||||
System.out.println("---------->"+AppData.appConfig.getDownloadhome() + tMod.getIcon());
|
||||
imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getImage(), modImage);
|
||||
imageLoader.displayImage(AppData.appConfig.getDownloadhome() + tMod.getIcon(), icon);
|
||||
title.setText(tMod.getTitle());
|
||||
by.setText("@" + tMod.getByuser());
|
||||
richText.text(tMod.getInfo());
|
||||
RichText.fromHtml(tMod.getInfo())
|
||||
.imageGetter(new DefaultImageGetter())
|
||||
//.type(RichType.html)
|
||||
.into(richText);
|
||||
downloadText.setTag(0);
|
||||
if (ModUtils.getModPath(tMod).listFiles().length > 0) {
|
||||
downloadText.setText("安装");
|
||||
downloadText.setTag(2);
|
||||
}
|
||||
if(ModUtils.isInstallMod(tMod)){
|
||||
downloadText.setText("还原");
|
||||
downloadText.setTag(1);
|
||||
}
|
||||
download.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
downloadButtonClick();
|
||||
downloadButtonClick();
|
||||
}
|
||||
});
|
||||
collection.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -140,7 +138,6 @@ public class ModActivity extends AppCompatActivity{
|
||||
json.put("mid", tMod.getId() + "");
|
||||
HttpUtils.post(HttpApi.HOME_URL + HttpApi.MOD_COLLCETION, json, new HttpInterface() {
|
||||
private String state = "收藏失败,未知错误";
|
||||
|
||||
@Override
|
||||
public void httpGetData(String string, int code) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user