| | |
| | | |
| | | import android.content.Context; |
| | | import android.net.Uri; |
| | | import android.text.TextUtils; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | |
| | | private final ArrayList<LocalMedia> list = new ArrayList<>(); |
| | | Map<String, UplodFileState> fileStates; |
| | | private int selectMax = 9; |
| | | private Context mContext; |
| | | private final Context mContext; |
| | | |
| | | |
| | | public AddPictureAdapter(Context context, List<LocalMedia> result, Map<String, UplodFileState> fileStates) { |
| | |
| | | } |
| | | |
| | | // 更新进度 |
| | | UplodFileState uplodFileState = fileStates.get(media.getCompressPath()); |
| | | UplodFileState uplodFileState; |
| | | if (TextUtils.isEmpty(media.getCompressPath())) { |
| | | uplodFileState = fileStates.get(media.getRealPath()); |
| | | } else { |
| | | uplodFileState = fileStates.get(media.getCompressPath()); |
| | | } |
| | | |
| | | |
| | | if (uplodFileState != null) { |
| | | uplodFileState.setAdapterPosition(position); |
| | | MyLog.d("progressRequestBodyHolder>>>" + "State:" + uplodFileState.getState() + ">>>position:" + position + ">>>Progress: " + uplodFileState.getProgress()); |
| | | |
| | |
| | | viewHolder.circleProgressView.setVisibility(View.GONE); |
| | | } else { |
| | | viewHolder.maskLayerBg.setVisibility(View.VISIBLE); |
| | | viewHolder.postError.setVisibility(View.VISIBLE); |
| | | viewHolder.circleProgressView.setVisibility(View.GONE); |
| | | } |
| | | } |
| | | |
| | | |
| | | //itemView 的点击事件 |
| | | if (mItemClickListener != null) { |