Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ private boolean commitPost(String mainCount, String childCount, String activityI
Map<String, String> map = new HashMap<>();
map.put("activity.attributeMap[main_post_num].attrValue", mainCount);
map.put("activity.attributeMap[sub_post_num].attrValue", childCount);
map.put("_method", "put");
String json = OkHttpClientManager.postAsString(context, url, map);
Gson gson = new GsonBuilder().create();
BaseResponseResult result = gson.fromJson(json, BaseResponseResult.class);
Expand Down
20 changes: 6 additions & 14 deletions app/src/main/java/com/haoyu/app/adapter/CorrectmarkAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import com.haoyu.app.entity.MEvaluateItemSubmissions;
import com.haoyu.app.entity.MEvaluateSubmission;
import com.haoyu.app.gdei.student.R;
import com.haoyu.app.utils.Common;
import com.haoyu.app.utils.Constants;
import com.haoyu.app.utils.OkHttpClientManager;
import com.haoyu.app.view.FullyLinearLayoutManager;
Expand Down Expand Up @@ -251,23 +252,14 @@ public FileAdapter(List<MFileInfo> mDatas) {
@Override
public void onBindHoder(RecyclerHolder holder, MFileInfo mFileInfo, int position) {
TextView mFileName = holder.obtainView(R.id.file_name);
ImageView mFileType = holder.obtainView(R.id.file_img);
ImageView iv_img = holder.obtainView(R.id.file_img);
if (mFileInfosList.size() > 0) {
final MFileInfo fileInfos = mFileInfosList.get(position);
mFileName.setText(fileInfos.getFileName());
String type = fileInfos.getUrl();
if (type.endsWith(".doc") || type.endsWith(".docx")) {
mFileType.setImageResource(R.drawable.resources_doc);
} else if (type.endsWith(".xls") || type.endsWith(".xlsx")) {
mFileType.setImageResource(R.drawable.resources_xls);
} else if (type.endsWith(".ppt") || holder.equals(".pptx")) {
mFileType.setImageResource(R.drawable.resources_ppt);
} else if (type.endsWith("pdf")) {
mFileType.setImageResource(R.drawable.resources_ppt);
} else {
mFileType.setImageResource(R.drawable.resources_unknown);
}
mFileType.setOnClickListener(new View.OnClickListener() {
String url = fileInfos.getUrl();
Common.setFileType(url, iv_img);

iv_img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {

Expand Down