抽离列表的onclick事件 还未完成(太太太多啦), click startActivityForResult相关已经完成

This commit is contained in:
kehaoyuan
2017-09-27 17:15:58 +08:00
parent 5b361afc67
commit b8ea968a58
36 changed files with 351 additions and 1077 deletions

View File

@ -27,7 +27,6 @@ import com.gh.common.util.PlatformUtils;
import com.gh.common.util.TrafficUtils;
import com.gh.common.view.SwipeLayout;
import com.gh.download.DownloadManager;
import com.gh.gamecenter.ChooseReceiverActivity;
import com.gh.gamecenter.GameDetailActivity;
import com.gh.gamecenter.InstallActivity;
import com.gh.gamecenter.R;
@ -57,8 +56,6 @@ import rx.Observable;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
import static com.gh.gamecenter.download.FileSendFragment.KC_REQUEST;
/**
* Created by LGT on 2016/8/12.
* 已安装界面-数据适配器
@ -292,21 +289,6 @@ public class InstallFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
}
if (this.gameList.size() != 0) {
// ArrayMap<String, ArrayList<GameEntity>> map = new ArrayMap<>();
// ArrayList<GameEntity> list;
// for (GameEntity gameEntity : this.gameList) {
// list = map.get(gameEntity.getId());
// if (list == null) {
// list = new ArrayList<>();
// map.put(gameEntity.getId(), list);
// }
// list.add(gameEntity);
// }
// list = new ArrayList<>();
// for (String key : map.keySet()) {
// list.addAll(map.get(key));
// }
// this.gameList = list;
isRemove = true;
notifyDataSetChanged();
@ -486,12 +468,6 @@ public class InstallFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
public void onOpen(SwipeLayout layout) {
skipKc(i);
holder.swipeLayout.close();
// holder.swipeLayout.postDelayed(new Runnable() {
// @Override
// public void run() {
// notifyItemRangeChanged(0 ,getItemCount());
// }
// }, 500);
}
@Override
@ -501,14 +477,12 @@ public class InstallFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
@Override
public void onClose(SwipeLayout layout) {
isSwipe = false;
// holder.swipeText.setPadding(0, 0, DisplayUtils.dip2px(mContext, 15), 0);
holder.swipeText.setText("右划发给好友\n免流量安装");
}
@Override
public void onUpdate(SwipeLayout layout, int leftOffset, int topOffset) {
if (leftOffset > maxWidth / 2.7 && leftOffset < maxWidth / 2.5) {
// holder.swipeText.setPadding(0, 0, DisplayUtils.dip2px(mContext, 30), 0);
holder.swipeText.setVisibility(View.GONE);
holder.swipeShareText.setVisibility(View.VISIBLE);
} else if (leftOffset > maxWidth / 2.5) {
@ -516,7 +490,6 @@ public class InstallFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
holder.swipeShareText.setVisibility(View.VISIBLE);
holder.swipeShareText.setText("放手发给好友\n免流量安装");
} else if (leftOffset < maxWidth / 2.7) {
// holder.swipeText.setPadding(0, 0, DisplayUtils.dip2px(mContext, 15), 0);
holder.swipeText.setVisibility(View.VISIBLE);
holder.swipeShareText.setVisibility(View.GONE);
holder.swipeShareText.setText("右划发给好友\n免流量安装");
@ -559,12 +532,12 @@ public class InstallFragmentAdapter extends BaseRecyclerAdapter<ViewHolder> {
fileInfos.add(fileInfo);
HaloApp.put(HaloApp.KEY_FILE_INFO, fileInfos);
mActivity.startActivityForResult(ChooseReceiverActivity.getIntent(mContext, true), KC_REQUEST);
smoothListener.onOpen();
}
public interface onSmoothLayoutListener {
void onSmooth();
void onOpen(); // 启动跳转
}
public class KcHintViewHolder extends ViewHolder {