基本处理完成recyclerview adapter

This commit is contained in:
CsHeng
2017-04-25 13:16:16 +08:00
parent 9ef8f5d1f2
commit 2725a59826
71 changed files with 2083 additions and 3009 deletions

View File

@ -1,67 +1,36 @@
package com.gh.gamecenter;
import android.Manifest;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.*;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.os.Environment;
import android.os.Handler;
import android.os.Message;
import android.os.Parcelable;
import android.os.*;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.*;
import butterknife.BindView;
import butterknife.OnClick;
import com.facebook.drawee.view.SimpleDraweeView;
import com.gh.base.AppController;
import com.gh.base.BaseActivity;
import com.gh.common.constant.Config;
import com.gh.common.util.DialogUtils;
import com.gh.common.util.NotificationUtils;
import com.gh.common.util.PackageUtils;
import com.gh.common.util.UserIconUtils;
import com.gh.common.util.Utils;
import com.gh.download.DownloadDao;
import com.gh.download.DownloadEntity;
import com.gh.download.DownloadStatus;
import com.gh.common.util.*;
import com.gh.download.*;
import com.gh.gamecenter.adapter.FileReceiverAdapter;
import com.gh.gamecenter.eventbus.EBDownloadChanged;
import com.gh.gamecenter.eventbus.EBDownloadStatus;
import com.gh.gamecenter.eventbus.EBPackage;
import com.gh.gamecenter.kuaichuan.BaseTransfer;
import com.gh.gamecenter.kuaichuan.Constant;
import com.gh.gamecenter.kuaichuan.FileInfo;
import com.gh.gamecenter.kuaichuan.FileReceiver;
import com.gh.gamecenter.kuaichuan.HotspotManager;
import com.gh.gamecenter.kuaichuan.IpPortInfo;
import com.gh.gamecenter.kuaichuan.WifiMgr;
import com.gh.gamecenter.eventbus.*;
import com.gh.gamecenter.kuaichuan.*;
import com.gh.gamecenter.manager.DataCollectionManager;
import de.greenrobot.event.EventBus;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.*;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import butterknife.BindView;
import butterknife.OnClick;
import de.greenrobot.event.EventBus;
import java.util.*;
/**
* Created by khy on 2017/1/20.
@ -180,7 +149,7 @@ public class FileReceiverActivity extends BaseActivity implements FileReceiverAd
ArrayList<Parcelable> list = getIntent().getParcelableArrayListExtra(Constant.KEY_IP_FILE_INFO);
mFileInfos = (List<FileInfo>) list.get(0);
mFileReceiverAdapter = new FileReceiverAdapter(this, mFileInfos);
mFileReceiverAdapter = new FileReceiverAdapter(this, this, mFileInfos);
mReceiverRv.setLayoutManager(new LinearLayoutManager(this));
mReceiverRv.setAdapter(mFileReceiverAdapter);