|
|
@@ -0,0 +1,496 @@
|
|
|
+package com.uas.rd_equipment.fragment;
|
|
|
+
|
|
|
+import android.Manifest;
|
|
|
+import android.app.Activity;
|
|
|
+import android.content.Intent;
|
|
|
+import android.content.pm.PackageManager;
|
|
|
+import android.database.Cursor;
|
|
|
+import android.graphics.Color;
|
|
|
+import android.net.Uri;
|
|
|
+import android.os.Build;
|
|
|
+import android.provider.MediaStore;
|
|
|
+import android.support.annotation.RequiresApi;
|
|
|
+import android.support.v4.app.ActivityCompat;
|
|
|
+import android.util.Log;
|
|
|
+import android.view.KeyEvent;
|
|
|
+import android.view.View;
|
|
|
+import android.widget.ImageView;
|
|
|
+import android.widget.TextView;
|
|
|
+
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.android.volley.Request;
|
|
|
+import com.uas.rd_equipment.R;
|
|
|
+import com.uas.rd_equipment.activity.FunctionActivity;
|
|
|
+import com.uas.rd_equipment.global.GloableParams;
|
|
|
+import com.uas.rd_equipment.interfaces.ProgressListener;
|
|
|
+import com.uas.rd_equipment.util.CommonUtil;
|
|
|
+import com.uas.rd_equipment.util.FastjsonUtil;
|
|
|
+import com.uas.rd_equipment.util.HttpCallback;
|
|
|
+import com.uas.rd_equipment.util.HttpParams;
|
|
|
+import com.uas.rd_equipment.util.UploadUtils;
|
|
|
+import com.uas.rd_equipment.util.VollyRequest;
|
|
|
+import com.uas.rd_equipment.view.ClearableEditText;
|
|
|
+import com.uas.rd_equipment.view.business.ProgressPopup;
|
|
|
+
|
|
|
+import java.io.File;
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
+import java.util.regex.Matcher;
|
|
|
+import java.util.regex.Pattern;
|
|
|
+
|
|
|
+import okhttp3.Call;
|
|
|
+import okhttp3.Callback;
|
|
|
+import okhttp3.MediaType;
|
|
|
+import okhttp3.MultipartBody;
|
|
|
+import okhttp3.RequestBody;
|
|
|
+import okhttp3.Response;
|
|
|
+
|
|
|
+/**
|
|
|
+ * Created by cjh-sail on 2023-07-11
|
|
|
+ */
|
|
|
+public class ProblemDetectionFragment extends BaseFragment{
|
|
|
+
|
|
|
+
|
|
|
+ private ImageView up_imageone;
|
|
|
+ private static final int REQUEST_CODE = 1;
|
|
|
+ private static final int REQUEST_CODETWO = 2;
|
|
|
+ private final int REQUEST_EXTERNAL_STORAGE = 1;
|
|
|
+ private String[] PERMISSIONS_STORAGE = {
|
|
|
+ Manifest.permission.READ_EXTERNAL_STORAGE,
|
|
|
+ Manifest.permission.WRITE_EXTERNAL_STORAGE };
|
|
|
+ private ImageView up_imagetwo;
|
|
|
+ private TextView tv_ic_code;
|
|
|
+ private ClearableEditText ce_ic_badname;
|
|
|
+ private ClearableEditText ce_ic_licode;
|
|
|
+ private ClearableEditText ce_ic_firstman;
|
|
|
+ private ClearableEditText ce_ic_secondman;
|
|
|
+ private ClearableEditText ce_ic_reason;
|
|
|
+ private TextView tv_prompt;
|
|
|
+ private TextView btn_commit;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected int getLayout() {
|
|
|
+ return R.layout.problemdetection_fragment;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void initViews() {
|
|
|
+ FunctionActivity.setTitle(getString(R.string.title_problem_detection));
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void initEvents() {
|
|
|
+ up_imageone = root.findViewById(R.id.up_imageone);
|
|
|
+ up_imagetwo = root.findViewById(R.id.up_imagetwo);
|
|
|
+ tv_ic_code = root.findViewById(R.id.tv_ic_code);
|
|
|
+ ce_ic_badname = root.findViewById(R.id.ce_ic_badname);
|
|
|
+ ce_ic_licode = root.findViewById(R.id.ce_ic_licode);
|
|
|
+ ce_ic_firstman = root.findViewById(R.id.ce_ic_firstman);
|
|
|
+ ce_ic_secondman = root.findViewById(R.id.ce_ic_secondman);
|
|
|
+ ce_ic_reason = root.findViewById(R.id.ce_ic_reason);
|
|
|
+ tv_prompt = root.findViewById(R.id.tv_prompt);
|
|
|
+ btn_commit = root.findViewById(R.id.btn_commit);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void initDatas() {
|
|
|
+ verifyStoragePermissions(mActivity);
|
|
|
+ up_imageone.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ int permission = ActivityCompat.checkSelfPermission(mActivity,
|
|
|
+ Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
|
|
+ if (permission != PackageManager.PERMISSION_GRANTED) {
|
|
|
+ // We don't have permission so prompt the user
|
|
|
+ ActivityCompat.requestPermissions(mActivity, PERMISSIONS_STORAGE,
|
|
|
+ REQUEST_EXTERNAL_STORAGE);
|
|
|
+ }else {
|
|
|
+ // 启动文件选择器
|
|
|
+ Intent intent = new Intent(Intent.ACTION_PICK);
|
|
|
+ intent.setType("image/*");
|
|
|
+ intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
|
|
+ startActivityForResult(Intent.createChooser(intent, "Select Images"), REQUEST_CODE);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ up_imagetwo.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN_MR2)
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+ int permission = ActivityCompat.checkSelfPermission(mActivity,
|
|
|
+ Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
|
|
+ if (permission != PackageManager.PERMISSION_GRANTED) {
|
|
|
+ // We don't have permission so prompt the user
|
|
|
+ ActivityCompat.requestPermissions(mActivity, PERMISSIONS_STORAGE,
|
|
|
+ REQUEST_EXTERNAL_STORAGE);
|
|
|
+ }else {
|
|
|
+ // 启动文件选择器
|
|
|
+ Intent intent = new Intent(Intent.ACTION_PICK);
|
|
|
+ intent.setType("image/*");
|
|
|
+ intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
|
|
|
+ startActivityForResult(Intent.createChooser(intent, "Select Images"), REQUEST_CODETWO);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ btn_commit.setOnClickListener(new View.OnClickListener() {
|
|
|
+ @Override
|
|
|
+ public void onClick(View v) {
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ public void getNewCommitData(){
|
|
|
+ String string_id = "";
|
|
|
+ String string_idtwo = "";
|
|
|
+ if (stringArrayList.size()==0){
|
|
|
+ string_id="";
|
|
|
+ }else {
|
|
|
+ for (int i=0;i<stringArrayList.size();i++){
|
|
|
+ String s = stringArrayList.get(i);
|
|
|
+ string_id+= s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (stringArrayListtwo.size()==0){
|
|
|
+ string_idtwo="";
|
|
|
+ }else {
|
|
|
+ for (int i=0;i<stringArrayListtwo.size();i++){
|
|
|
+ String s = stringArrayListtwo.get(i);
|
|
|
+ string_idtwo+= s;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ progressDialog.show();
|
|
|
+ JSONArray jsonArray = new JSONArray();
|
|
|
+ JSONObject object_1 = new JSONObject();
|
|
|
+ object_1.put("ic_code", tv_ic_code.getText().toString().trim());//单据编号
|
|
|
+ object_1.put("ic_badname", ce_ic_badname.getText().toString().trim());//稽查内容
|
|
|
+ object_1.put("ic_licode", ce_ic_licode.getText().toString().trim());//地点
|
|
|
+ object_1.put("ic_firstman", ce_ic_firstman.getText().toString().trim());//指定处理人
|
|
|
+ object_1.put("ic_badnameattach", string_id);//上传附件
|
|
|
+ object_1.put("ic_secondman", ce_ic_secondman.getText().toString().trim());//变更处理人
|
|
|
+ object_1.put("ic_reason", ce_ic_reason.getText().toString().trim());//改善措施
|
|
|
+ object_1.put("ic_reasonattach", string_idtwo);//上传附件
|
|
|
+ jsonArray.add(object_1);
|
|
|
+// jsonObject.put("data", jsonArray);
|
|
|
+ VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
+ .url(GloableParams.ASTATIONTHE_COMMIT_MAINITEM)
|
|
|
+ .method(Request.Method.GET)
|
|
|
+ .addParam("data",jsonArray.toString())
|
|
|
+ .build(), new HttpCallback() {
|
|
|
+ @Override
|
|
|
+ public void onSuccess(int flag, Object o) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ tv_prompt.setVisibility(View.VISIBLE);
|
|
|
+ tv_prompt.setTextColor(Color.GREEN);
|
|
|
+ tv_prompt.setText("提交成功");
|
|
|
+ stringArrayList.clear();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onFail(int flag, String failStr) throws Exception {
|
|
|
+ progressDialog.dismiss();
|
|
|
+ tv_prompt.setVisibility(View.VISIBLE);
|
|
|
+ tv_prompt.setTextColor(Color.RED);
|
|
|
+ tv_prompt.setText(failStr);
|
|
|
+// CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ public void verifyStoragePermissions(Activity activity) {
|
|
|
+ // Check if we have write permission
|
|
|
+ int permission = ActivityCompat.checkSelfPermission(activity,
|
|
|
+ Manifest.permission.WRITE_EXTERNAL_STORAGE);
|
|
|
+ if (permission != PackageManager.PERMISSION_GRANTED) {
|
|
|
+ // We don't have permission so prompt the user
|
|
|
+ ActivityCompat.requestPermissions(activity, PERMISSIONS_STORAGE,
|
|
|
+ REQUEST_EXTERNAL_STORAGE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private List<String> selectedImagePaths = new ArrayList<>();
|
|
|
+ private List<String> selectedImagePathstwo = new ArrayList<>();
|
|
|
+ private ProgressPopup mProgressPopup;
|
|
|
+ private String mEnclusureId = "";
|
|
|
+ private String mEnclusureIdtwo = "";
|
|
|
+ private List<String> stringArrayListtwo=new ArrayList<>();
|
|
|
+ private List<String> stringArrayList=new ArrayList<>();
|
|
|
+ private void uploadImages(List<String> imagePaths) {
|
|
|
+ for (String imagePath : imagePaths) {
|
|
|
+ try {
|
|
|
+ File mFile = new File(imagePath);
|
|
|
+ // 获得文件名
|
|
|
+ String fileName = mFile.getName();
|
|
|
+
|
|
|
+ MultipartBody.Builder builder = new MultipartBody.Builder();
|
|
|
+ builder.setType(MultipartBody.FORM);
|
|
|
+ //第一个参数要与Servlet中的一致
|
|
|
+ builder.addFormDataPart("file", fileName,
|
|
|
+ RequestBody.create(MediaType.parse("application/octet-stream"), mFile))
|
|
|
+ .addFormDataPart("type", "common")
|
|
|
+ .addFormDataPart("master", CommonUtil.getMaster(mActivity));
|
|
|
+ RequestBody multipartBody = builder.build();
|
|
|
+
|
|
|
+ if (mProgressPopup == null) {
|
|
|
+ mProgressPopup = new ProgressPopup(mActivity);
|
|
|
+ mProgressPopup.setTitle("附件上传中...");
|
|
|
+ }
|
|
|
+ mProgressPopup.setProgress(0);
|
|
|
+ mProgressPopup.showPopupWindow();
|
|
|
+
|
|
|
+
|
|
|
+ UploadUtils.getInstance().postFile(GloableParams.ADDRESS_MOBILE_UPLOADATTACHS, multipartBody, new ProgressListener() {
|
|
|
+ @Override
|
|
|
+ public void onProgress(long currentBytes, long contentLength, boolean isDone) {
|
|
|
+ int progress = (int) ((double) currentBytes * 100 / (double) contentLength);
|
|
|
+ mProgressPopup.setProgress(progress);
|
|
|
+ if (isDone || progress == 100) {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, new Callback() {
|
|
|
+ @Override
|
|
|
+ public void onFailure(Call call, IOException e) {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ Log.d("raomeng_uploadf", e.getMessage());
|
|
|
+ mActivity.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onResponse(Call call, Response response) throws IOException {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ if (response.code() == 200) {
|
|
|
+
|
|
|
+ try {
|
|
|
+ String result = response.body().string();
|
|
|
+ JSONObject resultObject = JSON.parseObject(result);
|
|
|
+ mEnclusureId = FastjsonUtil.getText(resultObject, "id");
|
|
|
+ String s = removeSpace(mEnclusureId);
|
|
|
+ String s1 = removeSpace2(s);
|
|
|
+ stringArrayList.add(s1+";");
|
|
|
+ Log.d("mEnclusureId", s1+"");
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ mActivity.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ CommonUtil.toastYESRepeat(mActivity, "附件上传成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ mActivity.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, new File[]{mFile});
|
|
|
+ } catch (Exception e) {
|
|
|
+ if (mProgressPopup != null) {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ }
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private void uploadImagesTwo(List<String> imagePaths) {
|
|
|
+ for (String imagePath : imagePaths) {
|
|
|
+ try {
|
|
|
+ File mFile = new File(imagePath);
|
|
|
+ // 获得文件名
|
|
|
+ String fileName = mFile.getName();
|
|
|
+
|
|
|
+ MultipartBody.Builder builder = new MultipartBody.Builder();
|
|
|
+ builder.setType(MultipartBody.FORM);
|
|
|
+ //第一个参数要与Servlet中的一致
|
|
|
+ builder.addFormDataPart("file", fileName,
|
|
|
+ RequestBody.create(MediaType.parse("application/octet-stream"), mFile))
|
|
|
+ .addFormDataPart("type", "common")
|
|
|
+ .addFormDataPart("master", CommonUtil.getMaster(mActivity));
|
|
|
+ RequestBody multipartBody = builder.build();
|
|
|
+
|
|
|
+ if (mProgressPopup == null) {
|
|
|
+ mProgressPopup = new ProgressPopup(mActivity);
|
|
|
+ mProgressPopup.setTitle("附件上传中...");
|
|
|
+ }
|
|
|
+ mProgressPopup.setProgress(0);
|
|
|
+ mProgressPopup.showPopupWindow();
|
|
|
+
|
|
|
+
|
|
|
+ UploadUtils.getInstance().postFile(GloableParams.ADDRESS_MOBILE_UPLOADATTACHS, multipartBody, new ProgressListener() {
|
|
|
+ @Override
|
|
|
+ public void onProgress(long currentBytes, long contentLength, boolean isDone) {
|
|
|
+ int progress = (int) ((double) currentBytes * 100 / (double) contentLength);
|
|
|
+ mProgressPopup.setProgress(progress);
|
|
|
+ if (isDone || progress == 100) {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, new Callback() {
|
|
|
+ @Override
|
|
|
+ public void onFailure(Call call, IOException e) {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ Log.d("raomeng_uploadf", e.getMessage());
|
|
|
+ mActivity.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onResponse(Call call, Response response) throws IOException {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ if (response.code() == 200) {
|
|
|
+
|
|
|
+ try {
|
|
|
+ String result = response.body().string();
|
|
|
+ JSONObject resultObject = JSON.parseObject(result);
|
|
|
+ mEnclusureIdtwo = FastjsonUtil.getText(resultObject, "id");
|
|
|
+ String s = removeSpace(mEnclusureIdtwo);
|
|
|
+ String s1 = removeSpace2(s);
|
|
|
+ stringArrayListtwo.add(s1+";");
|
|
|
+ Log.d("mEnclusureIdtwo", s1+"");
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ mActivity.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ CommonUtil.toastYESRepeat(mActivity, "附件上传成功");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ mActivity.runOnUiThread(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }, new File[]{mFile});
|
|
|
+ } catch (Exception e) {
|
|
|
+ if (mProgressPopup != null) {
|
|
|
+ mProgressPopup.dismiss();
|
|
|
+ }
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "附件上传失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public String removeSpace(String s) {
|
|
|
+ String regex = "\\[";
|
|
|
+ Pattern pattern = Pattern.compile(regex);
|
|
|
+ Matcher matcher = pattern.matcher(s);
|
|
|
+ return matcher.replaceAll("");
|
|
|
+ }
|
|
|
+ public String removeSpace2(String s) {
|
|
|
+ String regex = "]";
|
|
|
+ Pattern pattern = Pattern.compile(regex);
|
|
|
+ Matcher matcher = pattern.matcher(s);
|
|
|
+ return matcher.replaceAll("");
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getRealPathFromUri(Uri uri) {
|
|
|
+ // 获取真实的文件路径
|
|
|
+ String filePath;
|
|
|
+ String[] projection = {MediaStore.Images.Media.DATA};
|
|
|
+ Cursor cursor = mActivity.getContentResolver().query(uri, projection, null, null, null);
|
|
|
+ if (cursor == null) {
|
|
|
+ filePath = uri.getPath();
|
|
|
+ } else {
|
|
|
+ cursor.moveToFirst();
|
|
|
+ int columnIndex = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
+ filePath = cursor.getString(columnIndex);
|
|
|
+ cursor.close();
|
|
|
+ }
|
|
|
+ return filePath;
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
+ super.onActivityResult(requestCode, resultCode, data);
|
|
|
+ if (resultCode != Activity.RESULT_OK) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (requestCode == REQUEST_CODE && data!=null){
|
|
|
+ selectedImagePaths.clear();
|
|
|
+ if (data.getClipData() != null) {
|
|
|
+ // 用户选择了多个图片
|
|
|
+ int count = data.getClipData().getItemCount();
|
|
|
+ for (int i = 0; i < count; i++) {
|
|
|
+ Uri imageUri = data.getClipData().getItemAt(i).getUri();
|
|
|
+ selectedImagePaths.add(getRealPathFromUri(imageUri));
|
|
|
+ }
|
|
|
+ } else if (data.getData() != null) {
|
|
|
+ // 用户选择了单个图片
|
|
|
+ Uri imageUri = data.getData();
|
|
|
+ selectedImagePaths.add(getRealPathFromUri(imageUri));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 批量上传图片
|
|
|
+ uploadImages(selectedImagePaths);
|
|
|
+ }
|
|
|
+ if (requestCode == REQUEST_CODETWO && data!=null){
|
|
|
+ selectedImagePathstwo.clear();
|
|
|
+ if (data.getClipData() != null) {
|
|
|
+ // 用户选择了多个图片
|
|
|
+ int count = data.getClipData().getItemCount();
|
|
|
+ for (int i = 0; i < count; i++) {
|
|
|
+ Uri imageUri = data.getClipData().getItemAt(i).getUri();
|
|
|
+ selectedImagePathstwo.add(getRealPathFromUri(imageUri));
|
|
|
+ }
|
|
|
+ } else if (data.getData() != null) {
|
|
|
+ // 用户选择了单个图片
|
|
|
+ Uri imageUri = data.getData();
|
|
|
+ selectedImagePathstwo.add(getRealPathFromUri(imageUri));
|
|
|
+ }
|
|
|
+
|
|
|
+ // 批量上传图片
|
|
|
+ uploadImagesTwo(selectedImagePathstwo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public boolean onKeyDown(int keyCode, KeyEvent event) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public void onHiddenChanged(boolean hidden) {
|
|
|
+ super.onHiddenChanged(hidden);
|
|
|
+ if (hidden) {
|
|
|
+ ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
|
|
|
+ } else {
|
|
|
+ FunctionActivity.setTitle(getString(R.string.title_problem_detection));
|
|
|
+ ((FunctionActivity) getActivity()).setMoreBtnVisible(true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public boolean onFragmentBackPressed() {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+}
|