From 9032462238327b971df1a5f72ef343200a5e0103 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期三, 11 十二月 2024 18:13:44 +0800
Subject: [PATCH] 1.问题上报相关 2.问题上报列表相关 3.添加图片上传中断功能 4.图片添加的bug
---
app/src/main/java/com/dayu/pipirrapp/adapter/OrderAdapter.java | 16
app/src/main/java/com/dayu/pipirrapp/fragment/MyFragment.java | 7
app/src/main/res/drawable/ic_issue.xml | 25 +
app/src/main/java/com/dayu/pipirrapp/activity/OrderDealActivity.java | 80 +--
app/src/main/java/com/dayu/pipirrapp/fragment/OrderFragment.java | 16
app/src/main/res/layout/item_issue.xml | 266 +++++++++++
app/src/main/java/com/dayu/pipirrapp/bean/net/IssueResult.java | 99 ++++
app/src/main/res/layout/activity_order_deal.xml | 60 +
app/src/main/java/com/dayu/pipirrapp/net/subscribers/ProgressSubscriber.java | 3
app/src/main/res/layout/activity_issue_list.xml | 34 +
app/src/main/res/values/colors.xml | 3
app/src/main/java/com/dayu/pipirrapp/net/MqttManager.java | 6
app/src/main/res/layout/activity_add_issue.xml | 89 +++
app/src/main/java/com/dayu/pipirrapp/net/BaseResponse.java | 4
app/src/main/java/com/dayu/pipirrapp/activity/IssueListActivity.java | 119 +++++
app/src/main/java/com/dayu/pipirrapp/activity/AddIssueActivity.java | 120 ++---
app/src/main/java/com/dayu/pipirrapp/activity/BaseActivity.java | 20
app/src/main/java/com/dayu/pipirrapp/adapter/IssueAdapter.java | 132 +++++
app/src/main/java/com/dayu/pipirrapp/activity/OrderDetailActivity.java | 26
app/src/main/java/com/dayu/pipirrapp/net/ApiManager.java | 7
app/src/main/java/com/dayu/pipirrapp/service/MyLocationService.java | 6
app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java | 13
app/src/main/AndroidManifest.xml | 2
app/src/main/java/com/dayu/pipirrapp/bean/net/IssueListResult.java | 58 ++
app/src/main/java/com/dayu/pipirrapp/adapter/AddPictureAdapter.java | 13
/dev/null | 64 --
app/src/main/java/com/dayu/pipirrapp/tool/ImageFileCompressEngine.java | 62 ++
app/src/main/res/layout/fragment_my.xml | 18
app/src/main/java/com/dayu/pipirrapp/fragment/MapFragment.java | 9
29 files changed, 1,112 insertions(+), 265 deletions(-)
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 549d89d..826c166 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -104,6 +104,8 @@
</activity>
<activity android:name=".activity.OrderDetailActivity" />
<activity android:name=".activity.OrderDealActivity" />
+ <activity android:name=".activity.AddIssueActivity"/>
+ <activity android:name=".activity.IssueListActivity"/>
<!-- <activity android:name=".activity.MainActivity" />-->
diff --git a/app/src/main/java/com/dayu/pipirrapp/activity/AddQuestionActivity.java b/app/src/main/java/com/dayu/pipirrapp/activity/AddIssueActivity.java
similarity index 79%
rename from app/src/main/java/com/dayu/pipirrapp/activity/AddQuestionActivity.java
rename to app/src/main/java/com/dayu/pipirrapp/activity/AddIssueActivity.java
index a75fd74..ba78e09 100644
--- a/app/src/main/java/com/dayu/pipirrapp/activity/AddQuestionActivity.java
+++ b/app/src/main/java/com/dayu/pipirrapp/activity/AddIssueActivity.java
@@ -4,7 +4,6 @@
import android.content.Context;
import android.content.Intent;
-import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
@@ -26,7 +25,7 @@
import com.dayu.pipirrapp.bean.net.AddIssueRequest;
import com.dayu.pipirrapp.bean.net.InsectionResult;
import com.dayu.pipirrapp.bean.net.UplodFileState;
-import com.dayu.pipirrapp.databinding.ActivityAddQuestionBinding;
+import com.dayu.pipirrapp.databinding.ActivityAddIssueBinding;
import com.dayu.pipirrapp.fragment.OrderFragment;
import com.dayu.pipirrapp.net.ApiManager;
import com.dayu.pipirrapp.net.BaseResponse;
@@ -35,6 +34,7 @@
import com.dayu.pipirrapp.service.MyLocationService;
import com.dayu.pipirrapp.tool.FullyGridLayoutManager;
import com.dayu.pipirrapp.tool.GlideEngine;
+import com.dayu.pipirrapp.tool.ImageFileCompressEngine;
import com.dayu.pipirrapp.utils.CommonKeyName;
import com.dayu.pipirrapp.utils.ToastUtil;
import com.dayu.pipirrapp.view.TitleBar;
@@ -44,28 +44,21 @@
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.config.SelectMimeType;
import com.luck.picture.lib.decoration.GridSpacingItemDecoration;
-import com.luck.picture.lib.engine.CompressFileEngine;
import com.luck.picture.lib.engine.ImageEngine;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.entity.MediaExtraInfo;
import com.luck.picture.lib.interfaces.OnExternalPreviewEventListener;
-import com.luck.picture.lib.interfaces.OnKeyValueResultCallbackListener;
-import com.luck.picture.lib.utils.DateUtils;
import com.luck.picture.lib.utils.DensityUtil;
import com.luck.picture.lib.utils.MediaUtils;
import com.luck.picture.lib.utils.PictureFileUtils;
import com.tencent.bugly.crashreport.CrashReport;
-import java.io.File;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import top.zibin.luban.CompressionPredicate;
-import top.zibin.luban.Luban;
-import top.zibin.luban.OnNewCompressListener;
-import top.zibin.luban.OnRenameListener;
+import retrofit2.Call;
/**
* AddQuestionActivity -闂涓婃姤
@@ -74,10 +67,10 @@
* @version 1.0
* @since 2024-12-09
*/
-public class AddQuestionActivity extends BaseActivity{
- private String TAG = "AddQuestionActivity";
+public class AddIssueActivity extends BaseActivity {
+ private final String TAG = "AddQuestionActivity";
- ActivityAddQuestionBinding binding;
+ ActivityAddIssueBinding binding;
RecyclerView mRecyclerView;
AddPictureAdapter mAdapter;
int maxSelectNum = 10;//鏈�澶х収鐗�
@@ -97,17 +90,19 @@
latLonBean = (LatLonBean) o;
}
};
-
+
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- binding=ActivityAddQuestionBinding.inflate(LayoutInflater.from(this));
+ binding = ActivityAddIssueBinding.inflate(LayoutInflater.from(this));
setContentView(binding.getRoot());
-
+ launcherResult = createActivityResultLauncher();
+ initView();
+ startLocation();
}
void initView() {
- new TitleBar(this).setTitleText("澶勭悊宸ュ崟").setLeftIco().setLeftIcoListening(v -> AddQuestionActivity.this.finish());
+ new TitleBar(this).setTitleText("涓婃姤闂").setLeftIco().setLeftIcoListening(v -> AddIssueActivity.this.finish());
mRecyclerView = binding.recycler;
FullyGridLayoutManager manager = new FullyGridLayoutManager(this,
4, GridLayoutManager.VERTICAL, false);
@@ -126,10 +121,10 @@
@Override
public void onItemClick(View v, int position) {
// 棰勮鍥剧墖銆佽棰戙�侀煶棰�
- PictureSelector.create(AddQuestionActivity.this)
+ PictureSelector.create(AddIssueActivity.this)
.openPreview()
.setImageEngine(imageEngine)
- .setExternalPreviewEventListener(new AddQuestionActivity.MyExternalPreviewEventListener())
+ .setExternalPreviewEventListener(new AddIssueActivity.MyExternalPreviewEventListener())
.startActivityPreview(position, true, mAdapter.getData());
}
@@ -137,6 +132,11 @@
public void openPicture() {
//娣诲姞鍥剧墖
mOpenPicture();
+ }
+
+ @Override
+ public void onDeleteClick(int position) {
+ deleteItem(position);
}
});
binding.dealButton.setOnClickListener(v -> {
@@ -152,13 +152,13 @@
if (uplodFileStates.size() > 0) {
postData();
} else {
- ToastUtil.showToast(AddQuestionActivity.this, "璇蜂笂浼犲浘鐗�");
+ ToastUtil.showToast(AddIssueActivity.this, "璇蜂笂浼犲浘鐗�");
}
} else {
- ToastUtil.showToast(AddQuestionActivity.this, "鍥剧墖姝e湪涓婁紶璇风◢鍚庢彁浜�");
+ ToastUtil.showToast(AddIssueActivity.this, "鍥剧墖姝e湪涓婁紶璇风◢鍚庢彁浜�");
}
} else {
- ToastUtil.showToast(AddQuestionActivity.this, "璇疯緭鍏ュ弽棣堝唴瀹�");
+ ToastUtil.showToast(AddIssueActivity.this, "璇疯緭鍏ュ弽棣堝唴瀹�");
}
});
}
@@ -174,7 +174,7 @@
.setMaxVideoSelectNum(maxSelectVideoNum)
.setImageEngine(imageEngine)
//璁剧疆鍥剧墖鍘嬬缉
- .setCompressEngine(new AddQuestionActivity.ImageFileCompressEngine())
+ .setCompressEngine(new ImageFileCompressEngine())
.setSelectedData(mAdapter.getData());
selectionModel.forResult(launcherResult);
@@ -205,6 +205,7 @@
@Override
public void onPreviewDelete(int position) {
+ deleteItem(position);
mAdapter.remove(position);
mAdapter.notifyItemRemoved(position);
}
@@ -221,10 +222,13 @@
* @param result
*/
private void analyticalSelectResults(ArrayList<LocalMedia> result) {
+ //鑾峰彇褰撳墠uplodFileStates鎵�鏈夌殑鍥剧墖鍦板潃
Set<String> existingPaths = new HashSet<>();
for (UplodFileState uplodData : uplodFileStates) {
existingPaths.add(uplodData.getFilePath());
}
+ //鑾峰彇鍦≒ictureSelector鐨勭浉鍐屾椂鍙栨秷閫変腑鐨勫浘鐗�
+
for (LocalMedia media : result) {
if (media.getWidth() == 0 || media.getHeight() == 0) {
if (PictureMimeType.isHasImage(media.getMimeType())) {
@@ -254,10 +258,10 @@
Log.i(TAG, "鏂囦欢澶у皬: " + PictureFileUtils.formatAccurateUnitFileSize(media.getSize()));
Log.i(TAG, "鏂囦欢鏃堕暱: " + media.getDuration());
String compressPath = media.getCompressPath();
- //鍒ゆ柇鏄惁鏈夎繖涓矾寰勶紝娌℃湁鐨勮瘽涓婁紶璇ュ浘鐗�
+ //鍒ゆ柇鏄惁鏈夎繖涓矾寰勶紝娌℃湁鐨勮瘽涓婁紶璇ュ浘鐗囧苟娣诲姞uplodFileStates涓�
if (!existingPaths.contains(compressPath)) {
UplodFileState uplodFileState = new UplodFileState();
- uplodFileState.setFilePath(media.getRealPath());
+ uplodFileState.setFilePath(compressPath);
uplodFileStates.add(uplodFileState);
// 鎵ц涓婁紶鍥剧墖鐨勬搷浣�
uplodeImg(uplodFileState);
@@ -278,52 +282,6 @@
}
});
- }
-
-
- /**
- * 鑷畾涔夊浘鐗囧帇缂�
- */
- private static class ImageFileCompressEngine implements CompressFileEngine {
-
- @Override
- public void onStartCompress(Context context, ArrayList<Uri> source, OnKeyValueResultCallbackListener call) {
- Luban.with(context).load(source).ignoreBy(100).setRenameListener(new OnRenameListener() {
- @Override
- public String rename(String filePath) {
- int indexOf = filePath.lastIndexOf(".");
- String postfix = indexOf != -1 ? filePath.substring(indexOf) : ".jpg";
- return DateUtils.getCreateFileName("CMP_") + postfix;
- }
- }).filter(new CompressionPredicate() {
- @Override
- public boolean apply(String path) {
- if (PictureMimeType.isUrlHasImage(path) && !PictureMimeType.isHasHttp(path)) {
- return true;
- }
- return !PictureMimeType.isUrlHasGif(path);
- }
- }).setCompressListener(new OnNewCompressListener() {
- @Override
- public void onStart() {
-
- }
-
- @Override
- public void onSuccess(String source, File compressFile) {
- if (call != null) {
- call.onCallback(source, compressFile.getAbsolutePath());
- }
- }
-
- @Override
- public void onError(String source, Throwable e) {
- if (call != null) {
- call.onCallback(source, null);
- }
- }
- }).launch();
- }
}
@@ -363,9 +321,9 @@
public void onNext(BaseResponse<List<InsectionResult>> t) {
try {
if (t.isSuccess()) {
- ToastUtil.showToastLong(AddQuestionActivity.this, "涓婃姤鎴愬姛");
+ ToastUtil.showToastLong(AddIssueActivity.this, "涓婃姤鎴愬姛");
setResult(OrderFragment.RESULT_REFRESH);
- AddQuestionActivity.this.finish();
+ AddIssueActivity.this.finish();
} else {
}
@@ -400,5 +358,19 @@
super.onDestroy();
LiveEventBus.get(CommonKeyName.locationData).removeObserver(locationObserver);
}
-
+
+ /**
+ * 棰勮鍜屽浘鐗囧垪琛ㄥ垹闄ゅ浘鐗囨椂澶勭悊鍒犻櫎浜嬩欢
+ */
+ private void deleteItem(int position) {
+ try {
+ Call<BaseResponse> mCall = uplodFileStates.get(position).getThisCall();
+ if (mCall != null) {
+ mCall.cancel();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ uplodFileStates.remove(position);
+ }
}
diff --git a/app/src/main/java/com/dayu/pipirrapp/activity/BaseActivity.java b/app/src/main/java/com/dayu/pipirrapp/activity/BaseActivity.java
index 1b0c1af..4e7cecb 100644
--- a/app/src/main/java/com/dayu/pipirrapp/activity/BaseActivity.java
+++ b/app/src/main/java/com/dayu/pipirrapp/activity/BaseActivity.java
@@ -9,6 +9,7 @@
import androidx.appcompat.app.AppCompatActivity;
import com.dayu.pipirrapp.R;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
/**
* author: zuo
@@ -17,14 +18,25 @@
* 澶囨敞锛�
*/
public class BaseActivity extends AppCompatActivity {
+ int page = 0;
+ int pageSize=10;
+
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- Window window = getWindow();
- window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
- window.setStatusBarColor(getResources().getColor(R.color.title_color));
+ Window window = getWindow();
+ window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
+ window.setStatusBarColor(getResources().getColor(R.color.title_color));
+ }
+
+ public void layoutFinish(RefreshLayout refreshLayout, boolean isRefresh) {
+ if (refreshLayout != null) {
+ if (isRefresh) {
+ refreshLayout.finishRefresh();
+ } else {
+ refreshLayout.finishLoadMore();
+ }
}
}
}
diff --git a/app/src/main/java/com/dayu/pipirrapp/activity/IssueListActivity.java b/app/src/main/java/com/dayu/pipirrapp/activity/IssueListActivity.java
new file mode 100644
index 0000000..26283d2
--- /dev/null
+++ b/app/src/main/java/com/dayu/pipirrapp/activity/IssueListActivity.java
@@ -0,0 +1,119 @@
+package com.dayu.pipirrapp.activity;
+
+import android.os.Bundle;
+import android.view.LayoutInflater;
+
+import androidx.annotation.Nullable;
+import androidx.recyclerview.widget.LinearLayoutManager;
+
+import com.dayu.pipirrapp.MyApplication;
+import com.dayu.pipirrapp.adapter.IssueAdapter;
+import com.dayu.pipirrapp.bean.net.IssueListResult;
+import com.dayu.pipirrapp.bean.net.IssueResult;
+import com.dayu.pipirrapp.databinding.ActivityIssueListBinding;
+import com.dayu.pipirrapp.net.ApiManager;
+import com.dayu.pipirrapp.net.BaseResponse;
+import com.dayu.pipirrapp.net.Constants;
+import com.dayu.pipirrapp.net.subscribers.SubscriberListener;
+import com.dayu.pipirrapp.utils.ToastUtil;
+import com.dayu.pipirrapp.view.TitleBar;
+import com.scwang.smart.refresh.footer.ClassicsFooter;
+import com.scwang.smart.refresh.header.ClassicsHeader;
+import com.scwang.smart.refresh.layout.api.RefreshLayout;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * IssueListActivity -
+ *
+ * @author zuoxiao
+ * @version 1.0
+ * @since 2024-12-10
+ */
+public class IssueListActivity extends BaseActivity {
+
+ ActivityIssueListBinding binding;
+ RefreshLayout myRefreshLayout;
+ List<IssueResult> recordsList = new ArrayList<>();
+ IssueAdapter mAdapter;
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ binding = ActivityIssueListBinding.inflate(LayoutInflater.from(this));
+ setContentView(binding.getRoot());
+ initView();
+ getData(true);
+ }
+
+ private void initView() {
+ new TitleBar(this).setTitleText("闂鍒楄〃").setLeftIco().setLeftIcoListening(v -> IssueListActivity.this.finish());
+ myRefreshLayout = (RefreshLayout) binding.refreshLayout;
+ myRefreshLayout.setRefreshHeader(new ClassicsHeader(this));
+ myRefreshLayout.setRefreshFooter(new ClassicsFooter(this));
+
+ myRefreshLayout.setOnRefreshListener(refreshlayout -> {
+// refreshlayout.finishRefresh(2000/*,false*/);//浼犲叆false琛ㄧず鍒锋柊澶辫触
+ recordsList.clear();
+ page = 0;
+ getData(true);
+ });
+ myRefreshLayout.setOnLoadMoreListener(refreshlayout -> {
+ page = page + 1;
+ getData(false);
+ });
+
+ mAdapter = new IssueAdapter(this, recordsList);
+ LinearLayoutManager layoutManager = new LinearLayoutManager(this);
+ binding.recyclerView.setLayoutManager(layoutManager);
+ binding.recyclerView.setAdapter(mAdapter);
+ }
+
+
+ private void getData(boolean isRefresh) {
+ Map<String, Object> params = new HashMap<>();
+ if (isRefresh) {
+ page = 1;
+ recordsList.clear();
+ }
+ params.put("pageSize", pageSize);
+ params.put("pageCurr", page);
+ params.put("inspectorId", MyApplication.myApplication.userId);
+
+ ApiManager.getInstance().requestGetHideLoading(this, Constants.BASE_URL + "/app/issue/getIssueReports", IssueListResult.class, params, new SubscriberListener<BaseResponse<IssueListResult>>() {
+ @Override
+ public void onNext(BaseResponse<IssueListResult> t) {
+ if (t.isSuccess()) {
+ if (t.isSuccess()) {
+ if (t.getContent().getObj() != null && t.getContent().getObj().size() > 0) {
+ recordsList.addAll(t.getContent().getObj());
+ if (t.getContent().getPageTotal() == page) {
+ myRefreshLayout.finishLoadMoreWithNoMoreData();
+ }
+ } else {
+ myRefreshLayout.finishLoadMoreWithNoMoreData();
+ }
+ }
+ } else {
+ ToastUtil.showToast(IssueListActivity.this, t.getMsg());
+ }
+ }
+
+ @Override
+ public void onCloose() {
+ super.onCloose();
+ layoutFinish(myRefreshLayout, isRefresh);
+ mAdapter.notifyDataSetChanged();
+
+ }
+
+ });
+ }
+
+ public void startDetail(String issueReportId) {
+
+ }
+}
diff --git a/app/src/main/java/com/dayu/pipirrapp/activity/OrderDealActivity.java b/app/src/main/java/com/dayu/pipirrapp/activity/OrderDealActivity.java
index a95d750..a50d481 100644
--- a/app/src/main/java/com/dayu/pipirrapp/activity/OrderDealActivity.java
+++ b/app/src/main/java/com/dayu/pipirrapp/activity/OrderDealActivity.java
@@ -4,7 +4,6 @@
import android.content.Context;
import android.content.Intent;
-import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
@@ -34,6 +33,7 @@
import com.dayu.pipirrapp.service.MyLocationService;
import com.dayu.pipirrapp.tool.FullyGridLayoutManager;
import com.dayu.pipirrapp.tool.GlideEngine;
+import com.dayu.pipirrapp.tool.ImageFileCompressEngine;
import com.dayu.pipirrapp.utils.CommonKeyName;
import com.dayu.pipirrapp.utils.ToastUtil;
import com.dayu.pipirrapp.view.TitleBar;
@@ -43,28 +43,21 @@
import com.luck.picture.lib.config.PictureMimeType;
import com.luck.picture.lib.config.SelectMimeType;
import com.luck.picture.lib.decoration.GridSpacingItemDecoration;
-import com.luck.picture.lib.engine.CompressFileEngine;
import com.luck.picture.lib.engine.ImageEngine;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.entity.MediaExtraInfo;
import com.luck.picture.lib.interfaces.OnExternalPreviewEventListener;
-import com.luck.picture.lib.interfaces.OnKeyValueResultCallbackListener;
-import com.luck.picture.lib.utils.DateUtils;
import com.luck.picture.lib.utils.DensityUtil;
import com.luck.picture.lib.utils.MediaUtils;
import com.luck.picture.lib.utils.PictureFileUtils;
import com.tencent.bugly.crashreport.CrashReport;
-import java.io.File;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import top.zibin.luban.CompressionPredicate;
-import top.zibin.luban.Luban;
-import top.zibin.luban.OnNewCompressListener;
-import top.zibin.luban.OnRenameListener;
+import retrofit2.Call;
/**
* OrderDealDetailActivity -
@@ -142,6 +135,11 @@
//娣诲姞鍥剧墖
mOpenPicture();
}
+
+ @Override
+ public void onDeleteClick(int position) {
+ deleteItem(position);
+ }
});
binding.dealButton.setOnClickListener(v -> {
boolean isAllPost = true;
@@ -209,6 +207,7 @@
@Override
public void onPreviewDelete(int position) {
+ deleteItem(position);
mAdapter.remove(position);
mAdapter.notifyItemRemoved(position);
}
@@ -261,7 +260,7 @@
//鍒ゆ柇鏄惁鏈夎繖涓矾寰勶紝娌℃湁鐨勮瘽涓婁紶璇ュ浘鐗�
if (!existingPaths.contains(compressPath)) {
UplodFileState uplodFileState = new UplodFileState();
- uplodFileState.setFilePath(media.getRealPath());
+ uplodFileState.setFilePath(compressPath);
uplodFileStates.add(uplodFileState);
// 鎵ц涓婁紶鍥剧墖鐨勬搷浣�
uplodeImg(uplodFileState);
@@ -282,52 +281,6 @@
}
});
- }
-
-
- /**
- * 鑷畾涔夊浘鐗囧帇缂�
- */
- private static class ImageFileCompressEngine implements CompressFileEngine {
-
- @Override
- public void onStartCompress(Context context, ArrayList<Uri> source, OnKeyValueResultCallbackListener call) {
- Luban.with(context).load(source).ignoreBy(100).setRenameListener(new OnRenameListener() {
- @Override
- public String rename(String filePath) {
- int indexOf = filePath.lastIndexOf(".");
- String postfix = indexOf != -1 ? filePath.substring(indexOf) : ".jpg";
- return DateUtils.getCreateFileName("CMP_") + postfix;
- }
- }).filter(new CompressionPredicate() {
- @Override
- public boolean apply(String path) {
- if (PictureMimeType.isUrlHasImage(path) && !PictureMimeType.isHasHttp(path)) {
- return true;
- }
- return !PictureMimeType.isUrlHasGif(path);
- }
- }).setCompressListener(new OnNewCompressListener() {
- @Override
- public void onStart() {
-
- }
-
- @Override
- public void onSuccess(String source, File compressFile) {
- if (call != null) {
- call.onCallback(source, compressFile.getAbsolutePath());
- }
- }
-
- @Override
- public void onError(String source, Throwable e) {
- if (call != null) {
- call.onCallback(source, null);
- }
- }
- }).launch();
- }
}
@@ -405,4 +358,19 @@
super.onDestroy();
LiveEventBus.get(CommonKeyName.locationData).removeObserver(locationObserver);
}
+
+ /**
+ * 棰勮鍜屽浘鐗囧垪琛ㄥ垹闄ゅ浘鐗囨椂澶勭悊鍒犻櫎浜嬩欢
+ */
+ private void deleteItem(int position) {
+ try {
+ Call<BaseResponse> mCall = uplodFileStates.get(position).getThisCall();
+ if (mCall != null) {
+ mCall.cancel();
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ uplodFileStates.remove(position);
+ }
}
diff --git a/app/src/main/java/com/dayu/pipirrapp/activity/OrderDetailActivity.java b/app/src/main/java/com/dayu/pipirrapp/activity/OrderDetailActivity.java
index 9bcd497..3eec0f5 100644
--- a/app/src/main/java/com/dayu/pipirrapp/activity/OrderDetailActivity.java
+++ b/app/src/main/java/com/dayu/pipirrapp/activity/OrderDetailActivity.java
@@ -131,26 +131,26 @@
ProResultStateId = orderDetailResult.getProResultStateId();
switch (ProResultStateId) {
case 0://鏈笂鎶�
- binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.black));
- binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_no_bg));
- binding.dealButton.setBackgroundColor(getResources().getColor(R.color.title_color));
+ binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.black,null));
+ binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_no_bg,null));
+ binding.dealButton.setBackgroundColor(getResources().getColor(R.color.title_color,null));
binding.dealButton.setVisibility(View.VISIBLE);
break;
case 1://宸蹭笂鎶�
- binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white));
- binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_wait_bg));
- binding.dealButton.setBackgroundColor(getResources().getColor(R.color.delete_color));
+ binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white,null));
+ binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_wait_bg,null));
+ binding.dealButton.setBackgroundColor(getResources().getColor(R.color.delete_color,null));
binding.dealButton.setVisibility(View.VISIBLE);
binding.dealButton.setText("鍒犻櫎澶勭悊缁撴灉");
break;
case 2://宸插畬鎴�
- binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white));
- binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_finish_bg));
+ binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white,null));
+ binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_finish_bg,null));
binding.dealButton.setVisibility(View.GONE);
break;
case 3://琚┏鍥�
- binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white));
- binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_reject_bg));
+ binding.stateText.setTextColor(OrderDetailActivity.this.getResources().getColor(R.color.white,null));
+ binding.stateText.setBackground(OrderDetailActivity.this.getResources().getDrawable(R.drawable.order_state_reject_bg,null));
binding.dealButton.setBackgroundColor(getResources().getColor(R.color.title_color));
binding.dealButton.setVisibility(View.VISIBLE);
break;
@@ -159,6 +159,12 @@
} else {
ToastUtil.showToast(OrderDetailActivity.this, t.getMsg());
}
+ } else if (t.DATA_NULL.equals(t.getCode())) {
+ //宸ュ崟宸茶鍒犻櫎
+ ToastUtil.showToast(OrderDetailActivity.this, "璁㈠崟宸茶鍒犻櫎锛�");
+ setResult(OrderFragment.RESULT_REFRESH);
+ OrderDetailActivity.this.finish();
+
}
} else {
ToastUtil.showToast(OrderDetailActivity.this, t.getMsg());
diff --git a/app/src/main/java/com/dayu/pipirrapp/adapter/AddPictureAdapter.java b/app/src/main/java/com/dayu/pipirrapp/adapter/AddPictureAdapter.java
index fc6c8e1..f2f00db 100644
--- a/app/src/main/java/com/dayu/pipirrapp/adapter/AddPictureAdapter.java
+++ b/app/src/main/java/com/dayu/pipirrapp/adapter/AddPictureAdapter.java
@@ -8,6 +8,7 @@
import android.widget.ImageView;
import android.widget.TextView;
+import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.Glide;
@@ -43,7 +44,6 @@
*/
public void delete(int position) {
try {
-
if (position != RecyclerView.NO_POSITION && list.size() > position) {
list.remove(position);
notifyItemRemoved(position);
@@ -112,6 +112,7 @@
/**
* 鍒涘缓ViewHolder
*/
+ @NonNull
@Override
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View view = mInflater.inflate(R.layout.item_add_filter_image, viewGroup, false);
@@ -127,7 +128,7 @@
* 璁剧疆鍊�
*/
@Override
- public void onBindViewHolder(final ViewHolder viewHolder, final int position) {
+ public void onBindViewHolder(@NonNull final ViewHolder viewHolder, final int position) {
//灏戜簬MaxSize寮狅紝鏄剧ず缁х画娣诲姞鐨勫浘鏍�
if (getItemViewType(position) == TYPE_CAMERA) {
viewHolder.mImg.setImageResource(R.mipmap.ic_add_image);
@@ -145,6 +146,7 @@
viewHolder.mIvDel.setOnClickListener(view -> {
int index = viewHolder.getAbsoluteAdapterPosition();
if (index != RecyclerView.NO_POSITION && list.size() > index) {
+ mItemClickListener.onDeleteClick(index);
list.remove(index);
notifyItemRemoved(index);
notifyItemRangeChanged(index, list.size());
@@ -214,6 +216,13 @@
* Open PictureSelector
*/
void openPicture();
+
+ /**
+ * 鍒犻櫎浜嗘煇涓�涓�
+ *
+ * @param position
+ */
+ void onDeleteClick(int position);
}
private OnItemLongClickListener mItemLongClickListener;
diff --git a/app/src/main/java/com/dayu/pipirrapp/adapter/IssueAdapter.java b/app/src/main/java/com/dayu/pipirrapp/adapter/IssueAdapter.java
new file mode 100644
index 0000000..34e5c85
--- /dev/null
+++ b/app/src/main/java/com/dayu/pipirrapp/adapter/IssueAdapter.java
@@ -0,0 +1,132 @@
+package com.dayu.pipirrapp.adapter;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import androidx.annotation.NonNull;
+import androidx.databinding.DataBindingUtil;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.dayu.pipirrapp.R;
+import com.dayu.pipirrapp.activity.IssueListActivity;
+import com.dayu.pipirrapp.bean.net.IssueResult;
+import com.dayu.pipirrapp.databinding.ItemIssueBinding;
+import com.dayu.pipirrapp.databinding.ItemNoMoreBinding;
+
+import java.util.List;
+
+/**
+ * IssueAdapter -
+ *
+ * @author zuoxiao
+ * @version 1.0
+ * @since 2024-12-10
+ */
+public class IssueAdapter extends BaseRecyclerAdapter<RecyclerView.ViewHolder> {
+
+
+ List<IssueResult> recordsList;
+ IssueListActivity activity;
+
+ public IssueAdapter(IssueListActivity activity, List<IssueResult> recordsList) {
+ this.activity = activity;
+ this.recordsList = recordsList;
+ }
+
+ @NonNull
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+
+ if (viewType == VIEW_TYPE_EMPTY) {
+ ItemNoMoreBinding emptyView = DataBindingUtil.inflate((LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE), R.layout.item_no_more, parent, false);
+ return new BaseRecyclerAdapter.ViewHolderEmpty(emptyView);
+ } else {
+ ItemIssueBinding binding = DataBindingUtil.inflate((LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE), R.layout.item_issue, parent, false);
+ return new ViewHolder(binding, activity);
+ }
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+ if (holder instanceof ViewHolder) {
+ if (recordsList.size() > 0) {
+ IssueResult record = recordsList.get(position);
+ ((ViewHolder) holder).getBinding().setData(record);
+ ViewHolder mHolder= ((ViewHolder) holder);
+ //鐘舵��;1-鏈彈鐞嗭紝2-宸插彈鐞嗭紝3宸插垹闄�
+ switch (record.getStateId()) {
+ case 1://鏈彈鐞�
+ mHolder.mBinding.stateText.setTextColor(activity.getResources().getColor(R.color.white, null));
+ mHolder.mBinding.stateText.setBackground(activity.getResources().getDrawable(R.drawable.order_state_wait_bg, null));
+ mHolder.mBinding.replyContentLL.setVisibility(View.GONE);
+ mHolder.mBinding.replyTimeLL.setVisibility(View.GONE);
+ break;
+ case 2://宸插彈鐞�
+ mHolder.mBinding.stateText.setTextColor(activity.getResources().getColor(R.color.white, null));
+ mHolder.mBinding.stateText.setBackground(activity.getResources().getDrawable(R.drawable.order_state_finish_bg, null));
+ mHolder.mBinding.replyContentLL.setVisibility(View.VISIBLE);
+ mHolder.mBinding.replyTimeLL.setVisibility(View.VISIBLE);
+ break;
+ case 3://3宸插垹闄�
+ mHolder.mBinding.stateText.setTextColor(activity.getResources().getColor(R.color.white, null));
+ mHolder.mBinding.stateText.setBackground(activity.getResources().getDrawable(R.drawable.order_state_reject_bg, null));
+ mHolder.mBinding.replyContentLL.setVisibility(View.VISIBLE);
+ mHolder.mBinding.replyTimeLL.setVisibility(View.VISIBLE);
+ break;
+
+ }
+
+ }
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ //鍚屾椂杩欓噷涔熼渶瑕佹坊鍔犲垽鏂紝濡傛灉mData.size()涓�0鐨勮瘽锛屽彧寮曞叆涓�涓竷灞�锛屽氨鏄痚mptyView
+ // 閭d箞锛岃繖涓猺ecyclerView鐨刬temCount涓�1
+ if (recordsList != null) {
+ if (recordsList.size() == 0) {
+ return 1;
+ }
+ return recordsList.size();
+ } else {
+ return 1;
+ }
+
+ }
+
+ @Override
+ public int getItemViewType(int position) {
+ if (recordsList != null) {
+ if (recordsList.size() == 0) {
+ return VIEW_TYPE_EMPTY;
+ } else {
+ return VIEW_TYPE_ITEM;
+ }
+ } else {
+ return VIEW_TYPE_EMPTY;
+ }
+ }
+
+ static class ViewHolder extends RecyclerView.ViewHolder {
+ ItemIssueBinding mBinding;
+
+ public ItemIssueBinding getBinding() {
+ return mBinding;
+ }
+
+ public void setBinding(ItemIssueBinding binding) {
+ this.mBinding = binding;
+ }
+
+ public ViewHolder(ItemIssueBinding itemView, IssueListActivity issueListActivity) {
+ super(itemView.getRoot());
+ this.mBinding = itemView;
+ mBinding.setItemclidk(issueListActivity);
+ }
+ }
+
+
+}
diff --git a/app/src/main/java/com/dayu/pipirrapp/adapter/OrderAdapter.java b/app/src/main/java/com/dayu/pipirrapp/adapter/OrderAdapter.java
index f4dac01..37bee71 100644
--- a/app/src/main/java/com/dayu/pipirrapp/adapter/OrderAdapter.java
+++ b/app/src/main/java/com/dayu/pipirrapp/adapter/OrderAdapter.java
@@ -58,20 +58,20 @@
((OrderAdapter.ViewHolder) holder).getBinding().setData(record);
switch (record.getProResultStateId()) {
case 0://鏈笂鎶�
- ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.black));
- ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_no_bg));
+ ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.black,null));
+ ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_no_bg,null));
break;
case 1://宸蹭笂鎶�
- ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.white));
- ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_wait_bg));
+ ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.white,null));
+ ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_wait_bg,null));
break;
case 2://宸插畬鎴�
- ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.white));
- ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_finish_bg));
+ ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.white,null));
+ ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_finish_bg,null));
break;
case 3://琚┏鍥�
- ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.white));
- ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_reject_bg));
+ ((ViewHolder) holder).mBinding.stateText.setTextColor(context.getResources().getColor(R.color.white,null));
+ ((ViewHolder) holder).mBinding.stateText.setBackground(context.getResources().getDrawable(R.drawable.order_state_reject_bg,null));
break;
}
diff --git a/app/src/main/java/com/dayu/pipirrapp/bean/net/IssueListResult.java b/app/src/main/java/com/dayu/pipirrapp/bean/net/IssueListResult.java
new file mode 100644
index 0000000..8cf7ee0
--- /dev/null
+++ b/app/src/main/java/com/dayu/pipirrapp/bean/net/IssueListResult.java
@@ -0,0 +1,58 @@
+package com.dayu.pipirrapp.bean.net;
+
+import java.util.List;
+
+/**
+ * IssueListResult -
+ *
+ * @author zuoxiao
+ * @version 1.0
+ * @since 2024-12-11
+ */
+public class IssueListResult extends BaseResult {
+ int itemTotal;
+ int pageCurr;
+ int pageSize;
+ int pageTotal;
+ List<IssueResult> obj;
+
+ public int getItemTotal() {
+ return itemTotal;
+ }
+
+ public void setItemTotal(int itemTotal) {
+ this.itemTotal = itemTotal;
+ }
+
+ public int getPageCurr() {
+ return pageCurr;
+ }
+
+ public void setPageCurr(int pageCurr) {
+ this.pageCurr = pageCurr;
+ }
+
+ public int getPageSize() {
+ return pageSize;
+ }
+
+ public void setPageSize(int pageSize) {
+ this.pageSize = pageSize;
+ }
+
+ public int getPageTotal() {
+ return pageTotal;
+ }
+
+ public void setPageTotal(int pageTotal) {
+ this.pageTotal = pageTotal;
+ }
+
+ public List<IssueResult> getObj() {
+ return obj;
+ }
+
+ public void setObj(List<IssueResult> obj) {
+ this.obj = obj;
+ }
+}
diff --git a/app/src/main/java/com/dayu/pipirrapp/bean/net/IssueResult.java b/app/src/main/java/com/dayu/pipirrapp/bean/net/IssueResult.java
new file mode 100644
index 0000000..b5e2419
--- /dev/null
+++ b/app/src/main/java/com/dayu/pipirrapp/bean/net/IssueResult.java
@@ -0,0 +1,99 @@
+package com.dayu.pipirrapp.bean.net;
+
+import java.util.List;
+
+/**
+ * IssueResult -涓婃姤闂
+ *
+ * @author zuoxiao
+ * @version 1.0
+ * @since 2024-12-10
+ */
+public class IssueResult extends BaseResult {
+
+
+ public String issueReportId;// 2024121016522300010,
+ public String inspectorName;// 宸︽檽娴嬭瘯,
+ public String phone;//
+ public String reportTime;// 涓婃姤鏃堕棿
+ public String content;//涓婃姤鍐呭
+ //String audios: [],
+ //String videos: [],
+ public List<ImageResult> images;
+ public String replyTime;//涓婃姤鍥炲鏃堕棿 null,
+ public String replyContent;//鍥炲鍐呭
+ public int stateId;//
+ public String state;//鏈彈鐞�
+
+ public String getIssueReportId() {
+ return issueReportId;
+ }
+
+ public void setIssueReportId(String issueReportId) {
+ this.issueReportId = issueReportId;
+ }
+
+ public String getInspectorName() {
+ return inspectorName;
+ }
+
+ public void setInspectorName(String inspectorName) {
+ this.inspectorName = inspectorName;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public String getReportTime() {
+ return reportTime;
+ }
+
+ public void setReportTime(String reportTime) {
+ this.reportTime = reportTime;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public List<ImageResult> getImages() {
+ return images;
+ }
+
+ public void setImages(List<ImageResult> images) {
+ this.images = images;
+ }
+
+ public String getReplyTime() {
+ return replyTime;
+ }
+
+ public void setReplyTime(String replyTime) {
+ this.replyTime = replyTime;
+ }
+
+ public int getStateId() {
+ return stateId;
+ }
+
+ public void setStateId(int stateId) {
+ this.stateId = stateId;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+}
diff --git a/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java b/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java
index eeaf40e..2980e4b 100644
--- a/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java
+++ b/app/src/main/java/com/dayu/pipirrapp/bean/net/UplodFileState.java
@@ -1,5 +1,9 @@
package com.dayu.pipirrapp.bean.net;
+import com.dayu.pipirrapp.net.BaseResponse;
+
+import retrofit2.Call;
+
/**
* Copyright (C), 2023,
* Author: zuo
@@ -12,6 +16,15 @@
int number;//澶辫触鍚庨噸璇曠殑娆℃暟
String id;//涓婁紶鍚庣殑id
String webPath;//涓婁紶鍚庣殑鍦板潃
+ Call<BaseResponse> thisCall;//褰撳墠璇锋眰
+
+ public Call<BaseResponse> getThisCall() {
+ return thisCall;
+ }
+
+ public void setThisCall(Call<BaseResponse> thisCall) {
+ this.thisCall = thisCall;
+ }
public int getNumber() {
return number;
diff --git a/app/src/main/java/com/dayu/pipirrapp/fragment/MapFragment.java b/app/src/main/java/com/dayu/pipirrapp/fragment/MapFragment.java
index 7c63b91..d4f825f 100644
--- a/app/src/main/java/com/dayu/pipirrapp/fragment/MapFragment.java
+++ b/app/src/main/java/com/dayu/pipirrapp/fragment/MapFragment.java
@@ -25,6 +25,7 @@
import androidx.lifecycle.Observer;
import com.dayu.pipirrapp.R;
+import com.dayu.pipirrapp.activity.AddIssueActivity;
import com.dayu.pipirrapp.bean.db.CenterPointBean;
import com.dayu.pipirrapp.bean.db.InspectionBean;
import com.dayu.pipirrapp.bean.db.InspectionLocationBean;
@@ -80,8 +81,6 @@
static String TAG = "MapFragment";
FragmentMapBinding binding;
- //瀹氫綅鐩稿叧
- LocationManager locationManager;
WebView mWebView;
CenterPointBean centerPointBean;
@@ -372,8 +371,9 @@
chageInspecState(InspectionUtils.STOP_INSPECTION);
});
//涓婃姤闂
- binding.putButton.setOnClickListener(v->{
-
+ binding.putButton.setOnClickListener(v -> {
+ Intent issue = new Intent(MapFragment.this.getActivity(), AddIssueActivity.class);
+ MapFragment.this.getActivity().startActivity(issue);
});
}
@@ -453,7 +453,6 @@
}
});
}
-
/**
diff --git a/app/src/main/java/com/dayu/pipirrapp/fragment/MyFragment.java b/app/src/main/java/com/dayu/pipirrapp/fragment/MyFragment.java
index 387158e..28aa351 100644
--- a/app/src/main/java/com/dayu/pipirrapp/fragment/MyFragment.java
+++ b/app/src/main/java/com/dayu/pipirrapp/fragment/MyFragment.java
@@ -12,6 +12,7 @@
import androidx.annotation.Nullable;
import com.dayu.pipirrapp.activity.ChangePSActivity;
+import com.dayu.pipirrapp.activity.IssueListActivity;
import com.dayu.pipirrapp.activity.LoginActivity;
import com.dayu.pipirrapp.bean.db.LoginBean;
import com.dayu.pipirrapp.dao.DaoSingleton;
@@ -32,7 +33,6 @@
*/
public class MyFragment extends BaseFragment {
FragmentMyBinding binding;
- ConfirmDialog confirmDialog;
@Nullable
@Override
@@ -89,6 +89,11 @@
confirmDialog.show();
});
+
+ binding.issueListRL.setOnClickListener(v -> {
+ Intent intent = new Intent(MyFragment.this.getContext(), IssueListActivity.class);
+ MyFragment.this.getActivity().startActivity(intent);
+ });
}
private void initData() {
diff --git a/app/src/main/java/com/dayu/pipirrapp/fragment/OrderFragment.java b/app/src/main/java/com/dayu/pipirrapp/fragment/OrderFragment.java
index 0c356c5..377837d 100644
--- a/app/src/main/java/com/dayu/pipirrapp/fragment/OrderFragment.java
+++ b/app/src/main/java/com/dayu/pipirrapp/fragment/OrderFragment.java
@@ -235,20 +235,20 @@
void chooseStateView(boolean state) {
if (state) {
- binding.manageStateProgress.setTextColor(getResources().getColor(R.color.title_color));
- binding.manageStateProgress.setBackground(getResources().getDrawable(R.drawable.ic_choose_bg_whit));
+ binding.manageStateProgress.setTextColor(getResources().getColor(R.color.title_color,null));
+ binding.manageStateProgress.setBackground(getResources().getDrawable(R.drawable.ic_choose_bg_whit,null));
binding.manageStateProgress.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
- binding.manageStateFinish.setTextColor(getResources().getColor(R.color.black));
- binding.manageStateFinish.setBackground(getResources().getDrawable(R.color.title_choose_bg));
+ binding.manageStateFinish.setTextColor(getResources().getColor(R.color.black,null));
+ binding.manageStateFinish.setBackground(getResources().getDrawable(R.color.title_choose_bg,null));
binding.manageStateFinish.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
binding.refreshLayout.setVisibility(View.VISIBLE);
binding.refreshLayoutDone.setVisibility(View.GONE);
} else {
- binding.manageStateFinish.setTextColor(getResources().getColor(R.color.title_color));
- binding.manageStateFinish.setBackground(getResources().getDrawable(R.drawable.ic_choose_bg_whit));
+ binding.manageStateFinish.setTextColor(getResources().getColor(R.color.title_color,null));
+ binding.manageStateFinish.setBackground(getResources().getDrawable(R.drawable.ic_choose_bg_whit,null));
binding.manageStateFinish.setTypeface(Typeface.defaultFromStyle(Typeface.BOLD));
- binding.manageStateProgress.setTextColor(getResources().getColor(R.color.black));
- binding.manageStateProgress.setBackground(getResources().getDrawable(R.color.title_choose_bg));
+ binding.manageStateProgress.setTextColor(getResources().getColor(R.color.black,null));
+ binding.manageStateProgress.setBackground(getResources().getDrawable(R.color.title_choose_bg,null));
binding.manageStateProgress.setTypeface(Typeface.defaultFromStyle(Typeface.NORMAL));
binding.refreshLayout.setVisibility(View.GONE);
binding.refreshLayoutDone.setVisibility(View.VISIBLE);
diff --git a/app/src/main/java/com/dayu/pipirrapp/net/ApiManager.java b/app/src/main/java/com/dayu/pipirrapp/net/ApiManager.java
index fad2f78..d6ba8f9 100644
--- a/app/src/main/java/com/dayu/pipirrapp/net/ApiManager.java
+++ b/app/src/main/java/com/dayu/pipirrapp/net/ApiManager.java
@@ -2,6 +2,7 @@
import static com.luck.picture.lib.thread.PictureThreadUtils.runOnUiThread;
+import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
@@ -239,6 +240,7 @@
*
* @param urlPath
*/
+ @SuppressLint("CheckResult")
public void donwLoadTile(Context context, String urlPath) {
if (NetUtils.isNetworkAvailable(context)) {
Observable<ResponseBody> observable;
@@ -300,7 +302,9 @@
});
MultipartBody.Part body = MultipartBody.Part.createFormData("file", file.getName(), progressRequestBody);
RequestBody description = RequestBody.create(MediaType.parse("text/plain"), "file description");
- apiService.uploadFile(body, description).enqueue(new Callback<BaseResponse>() {
+ Call<BaseResponse> uploadFile = apiService.uploadFile(body, description);
+ uplodData.setThisCall(uploadFile);
+ uploadFile.enqueue(new Callback<BaseResponse>() {
@Override
public void onResponse(Call<BaseResponse> call, Response<BaseResponse> response) {
if (response.body() != null) {
@@ -332,6 +336,7 @@
}
}
});
+
}
/**
diff --git a/app/src/main/java/com/dayu/pipirrapp/net/BaseResponse.java b/app/src/main/java/com/dayu/pipirrapp/net/BaseResponse.java
index 781f45d..8b3af51 100644
--- a/app/src/main/java/com/dayu/pipirrapp/net/BaseResponse.java
+++ b/app/src/main/java/com/dayu/pipirrapp/net/BaseResponse.java
@@ -7,6 +7,10 @@
* Description:杩斿洖鍙傛暟涓荤被
*/
public class BaseResponse<T> {
+ //鏁版嵁宸茶鍒犻櫎鎴栦负绌�
+ public final String DATA_NULL = "1001";
+
+
private String code;
private String msg;
private T content;
diff --git a/app/src/main/java/com/dayu/pipirrapp/net/MqttManager.java b/app/src/main/java/com/dayu/pipirrapp/net/MqttManager.java
index d669dd5..ec1c035 100644
--- a/app/src/main/java/com/dayu/pipirrapp/net/MqttManager.java
+++ b/app/src/main/java/com/dayu/pipirrapp/net/MqttManager.java
@@ -1,7 +1,6 @@
package com.dayu.pipirrapp.net;
import android.content.Context;
-import android.net.ConnectivityManager;
import android.util.Log;
import androidx.lifecycle.LifecycleOwner;
@@ -32,8 +31,9 @@
*/
public class MqttManager {
- private static final String MQTT_BROKER_URL = "tcp://115.236.153.170:30764"; // 淇敼涓轰綘鐨� broker 鍦板潃
- private static final String CLIENT_ID = "mqttx_f62ef124";
+// private static final String MQTT_BROKER_URL = "tcp://115.236.153.170:30764"; // 淇敼涓轰綘鐨� broker 鍦板潃
+private static final String MQTT_BROKER_URL = "tcp://192.168.10.52:1883";
+ private static final String CLIENT_ID = "mqttx_a7a9fe73";
private static final String TOPIC = "workOrder"; // 璁㈤槄鐨勪富棰�
private MqttClient mqttClient;
diff --git a/app/src/main/java/com/dayu/pipirrapp/net/subscribers/ProgressSubscriber.java b/app/src/main/java/com/dayu/pipirrapp/net/subscribers/ProgressSubscriber.java
index b092e96..a06502a 100644
--- a/app/src/main/java/com/dayu/pipirrapp/net/subscribers/ProgressSubscriber.java
+++ b/app/src/main/java/com/dayu/pipirrapp/net/subscribers/ProgressSubscriber.java
@@ -76,6 +76,9 @@
}
+ /**
+ * 涓嶇鏄痚rror杩樻槸鎴愬姛鏈�鍚庨兘浼氳皟鐢�
+ */
@Override
public void onCloose() {
mSubscriberListener.onCloose();
diff --git a/app/src/main/java/com/dayu/pipirrapp/service/MyLocationService.java b/app/src/main/java/com/dayu/pipirrapp/service/MyLocationService.java
index 3b17e9c..fe11917 100644
--- a/app/src/main/java/com/dayu/pipirrapp/service/MyLocationService.java
+++ b/app/src/main/java/com/dayu/pipirrapp/service/MyLocationService.java
@@ -67,7 +67,9 @@
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
MyLog.i("onStartCommand()");
- isSingle = intent.getBooleanExtra("isSingle", false);
+ if (intent != null) {
+ isSingle = intent.getBooleanExtra("isSingle", false);
+ }
if (!isSingle) {
// 鍦ˋPI11涔嬪悗鏋勫缓Notification鐨勬柟寮�
Notification.Builder builder = new Notification.Builder
@@ -159,7 +161,7 @@
MyLog.i("鍘熺敓瀹氫綅娌℃湁鏉冮檺>>>>");
return;
}
- locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER , 1000, 0, listener);
+ locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, listener);
} catch (Exception e) {
CrashReport.postCatchedException(e);
}
diff --git a/app/src/main/java/com/dayu/pipirrapp/tool/ImageFileCompressEngine.java b/app/src/main/java/com/dayu/pipirrapp/tool/ImageFileCompressEngine.java
new file mode 100644
index 0000000..ea000a9
--- /dev/null
+++ b/app/src/main/java/com/dayu/pipirrapp/tool/ImageFileCompressEngine.java
@@ -0,0 +1,62 @@
+package com.dayu.pipirrapp.tool;
+
+import android.content.Context;
+import android.net.Uri;
+
+import com.luck.picture.lib.config.PictureMimeType;
+import com.luck.picture.lib.engine.CompressFileEngine;
+import com.luck.picture.lib.interfaces.OnKeyValueResultCallbackListener;
+import com.luck.picture.lib.utils.DateUtils;
+
+import java.io.File;
+import java.util.ArrayList;
+
+import top.zibin.luban.Luban;
+import top.zibin.luban.OnNewCompressListener;
+import top.zibin.luban.OnRenameListener;
+
+/**
+ * ImageFileCompressEngine -鑷畾涔夊浘鐗囧帇缂�
+ *
+ * @author zuoxiao
+ * @version 1.0
+ * @since 2024-12-10
+ */
+public class ImageFileCompressEngine implements CompressFileEngine {
+ @Override
+ public void onStartCompress(Context context, ArrayList<Uri> source, OnKeyValueResultCallbackListener call) {
+ Luban.with(context).load(source).ignoreBy(100).setRenameListener(new OnRenameListener() {
+ @Override
+ public String rename(String filePath) {
+ int indexOf = filePath.lastIndexOf(".");
+ String postfix = indexOf != -1 ? filePath.substring(indexOf) : ".jpg";
+ return DateUtils.getCreateFileName("CMP_") + postfix;
+ }
+ }).filter(path -> {
+ if (PictureMimeType.isUrlHasImage(path) && !PictureMimeType.isHasHttp(path)) {
+ return true;
+ }
+ return !PictureMimeType.isUrlHasGif(path);
+ }).setCompressListener(new OnNewCompressListener() {
+ @Override
+ public void onStart() {
+
+ }
+
+ @Override
+ public void onSuccess(String source, File compressFile) {
+ if (call != null) {
+ call.onCallback(source, compressFile.getAbsolutePath());
+ }
+ }
+
+ @Override
+ public void onError(String source, Throwable e) {
+ if (call != null) {
+ call.onCallback(source, null);
+ }
+ }
+ }).launch();
+
+ }
+}
diff --git a/app/src/main/res/drawable/ic_issue.xml b/app/src/main/res/drawable/ic_issue.xml
new file mode 100644
index 0000000..5943a0b
--- /dev/null
+++ b/app/src/main/res/drawable/ic_issue.xml
@@ -0,0 +1,25 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="24dp"
+ android:height="24dp"
+ android:viewportWidth="48"
+ android:viewportHeight="48">
+ <path
+ android:pathData="M44,8H4V38H19L24,43L29,38H44V8Z"
+ android:strokeLineJoin="round"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#3D8BFF"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M24,23V32"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#3D8BFF"
+ android:strokeLineCap="round"/>
+ <path
+ android:pathData="M24,16V17"
+ android:strokeWidth="4"
+ android:fillColor="#00000000"
+ android:strokeColor="#3D8BFF"
+ android:strokeLineCap="round"/>
+</vector>
diff --git a/app/src/main/res/layout/activity_add_issue.xml b/app/src/main/res/layout/activity_add_issue.xml
new file mode 100644
index 0000000..66d38ad
--- /dev/null
+++ b/app/src/main/res/layout/activity_add_issue.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent">
+
+ <include
+ android:id="@+id/title"
+ layout="@layout/top_title" />
+
+ <LinearLayout
+ android:id="@+id/center"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_above="@+id/deal_button"
+ android:layout_below="@+id/title"
+ android:orientation="vertical"
+ android:padding="20dp">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="* "
+ android:textColor="@color/base_red"
+ android:textSize="@dimen/order_detail_button_size" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="鍙嶉鍐呭锛�"
+ android:textColor="@color/black"
+ android:textSize="@dimen/order_detail_button_size" />
+ </LinearLayout>
+
+ <EditText
+ android:id="@+id/contentET"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:background="@drawable/edittext_backgroud"
+ android:gravity="start"
+ android:maxHeight="200dp"
+ android:minHeight="100dp"
+ android:text="" />
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:orientation="horizontal">
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="* "
+ android:textColor="@color/base_red"
+ android:textSize="@dimen/order_detail_button_size" />
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+
+ android:text="鎻愪氦鍥剧墖锛�"
+ android:textColor="@color/black"
+ android:textSize="@dimen/order_detail_button_size" />
+ </LinearLayout>
+
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="10dp"
+ android:background="@color/white"
+ android:overScrollMode="never"
+ android:padding="5dp" />
+
+ </LinearLayout>
+
+ <TextView
+ android:id="@+id/deal_button"
+ android:layout_width="match_parent"
+ android:layout_height="@dimen/order_detail_button_height"
+ android:layout_alignParentBottom="true"
+ android:background="@color/title_color"
+ android:gravity="center"
+ android:text="涓婃姤闂"
+ android:textColor="@color/white"
+ android:textSize="@dimen/order_detail_button_size" />
+</RelativeLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_add_question.xml b/app/src/main/res/layout/activity_add_question.xml
deleted file mode 100644
index 1817042..0000000
--- a/app/src/main/res/layout/activity_add_question.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <include
- android:id="@+id/title"
- layout="@layout/top_title" />
- <LinearLayout
- android:id="@+id/center"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_above="@+id/deal_button"
- android:layout_below="@+id/title"
- android:orientation="vertical"
- android:padding="20dp">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="鍙嶉鍐呭锛�"
- android:textColor="@color/black"
- android:textSize="@dimen/order_detail_button_size" />
-
-
- <EditText
- android:id="@+id/contentET"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="10dp"
- android:text=""
- android:gravity="start"
- android:background="@drawable/edittext_backgroud"
- android:minHeight="100dp"
- android:maxHeight="200dp"/>
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="鎻愪氦鍥剧墖锛�"
- android:layout_marginTop="10dp"
- android:textColor="@color/black"
- android:textSize="@dimen/order_detail_button_size" />
- <androidx.recyclerview.widget.RecyclerView
- android:id="@+id/recycler"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:padding="5dp"
- android:background="@color/white"
- android:layout_marginTop="10dp"
- android:overScrollMode="never" />
-
- </LinearLayout>
- <TextView
- android:id="@+id/deal_button"
- android:layout_width="match_parent"
- android:layout_height="@dimen/order_detail_button_height"
- android:layout_alignParentBottom="true"
- android:background="@color/title_color"
- android:gravity="center"
- android:text="涓婃姤闂"
- android:textColor="@color/white"
- android:textSize="@dimen/order_detail_button_size" />
-</RelativeLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_issue_list.xml b/app/src/main/res/layout/activity_issue_list.xml
new file mode 100644
index 0000000..8473e08
--- /dev/null
+++ b/app/src/main/res/layout/activity_issue_list.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="vertical">
+
+ <include
+ android:id="@+id/title"
+ layout="@layout/top_title" />
+
+
+ <com.scwang.smart.refresh.layout.SmartRefreshLayout
+ android:id="@+id/refreshLayout"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:layout_below="@+id/line">
+
+ <com.scwang.smart.refresh.header.ClassicsHeader
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recyclerView"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#fff"
+ android:overScrollMode="never"
+ android:padding="10dp" />
+
+ <com.scwang.smart.refresh.footer.ClassicsFooter
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content" />
+ </com.scwang.smart.refresh.layout.SmartRefreshLayout>
+</LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_order_deal.xml b/app/src/main/res/layout/activity_order_deal.xml
index f10ecde..cd2e5e8 100644
--- a/app/src/main/res/layout/activity_order_deal.xml
+++ b/app/src/main/res/layout/activity_order_deal.xml
@@ -33,12 +33,25 @@
android:orientation="vertical"
android:padding="20dp">
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="鍙嶉鍐呭锛�"
- android:textColor="@color/black"
- android:textSize="@dimen/order_detail_button_size" />
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="* "
+ android:textColor="@color/base_red"
+ android:textSize="@dimen/order_detail_button_size" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="鍙嶉鍐呭锛�"
+ android:textColor="@color/black"
+ android:textSize="@dimen/order_detail_button_size" />
+ </LinearLayout>
<EditText
@@ -46,27 +59,42 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
- android:text=""
- android:gravity="start"
android:background="@drawable/edittext_backgroud"
+ android:gravity="start"
+ android:maxHeight="200dp"
android:minHeight="100dp"
- android:maxHeight="200dp"/>
+ android:text="" />
- <TextView
- android:layout_width="wrap_content"
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="鎻愪氦鍥剧墖锛�"
android:layout_marginTop="10dp"
- android:textColor="@color/black"
- android:textSize="@dimen/order_detail_button_size" />
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="* "
+ android:textColor="@color/base_red"
+ android:textSize="@dimen/order_detail_button_size" />
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+
+ android:text="鎻愪氦鍥剧墖锛�"
+ android:textColor="@color/black"
+ android:textSize="@dimen/order_detail_button_size" />
+ </LinearLayout>
+
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:padding="5dp"
- android:background="@color/white"
android:layout_marginTop="10dp"
- android:overScrollMode="never" />
+ android:background="@color/white"
+ android:overScrollMode="never"
+ android:padding="5dp" />
</LinearLayout>
diff --git a/app/src/main/res/layout/fragment_my.xml b/app/src/main/res/layout/fragment_my.xml
index 731f974..636d209 100644
--- a/app/src/main/res/layout/fragment_my.xml
+++ b/app/src/main/res/layout/fragment_my.xml
@@ -7,16 +7,15 @@
android:background="@color/bg_color">
-
<TextView
android:id="@+id/title"
android:layout_width="match_parent"
+ android:layout_height="@dimen/title_height"
android:background="@color/title_color"
- android:textSize="@dimen/title_center_text_size"
android:gravity="center"
android:text="鎴戠殑"
android:textColor="@color/white"
- android:layout_height="@dimen/title_height"/>
+ android:textSize="@dimen/title_center_text_size" />
<View
@@ -71,7 +70,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
- android:text="18311594524"
+ android:text=""
android:textColor="@color/grey" />
</LinearLayout>
@@ -80,7 +79,7 @@
<RelativeLayout
- android:id="@+id/headRL"
+ android:id="@+id/issueListRL"
android:layout_width="match_parent"
android:layout_height="@dimen/item_height"
android:layout_below="@+id/headRL_top">
@@ -88,11 +87,10 @@
<TextView
android:layout_width="match_parent"
android:layout_height="@dimen/item_height"
-
android:background="@color/white"
android:gravity="center_vertical"
android:paddingLeft="30dp"
- android:text="澶村儚"
+ android:text="闂鍒楄〃"
android:textColor="@color/black"
android:textSize="@dimen/my_item_text_size" />
@@ -110,7 +108,7 @@
android:id="@+id/passwordRL"
android:layout_width="match_parent"
android:layout_height="@dimen/item_height"
- android:layout_below="@+id/headRL"
+ android:layout_below="@+id/issueListRL"
android:layout_marginTop="1dp">
<TextView
@@ -160,6 +158,7 @@
android:layout_marginRight="15dp"
android:src="@drawable/ic_right" />
</RelativeLayout>
+
<RelativeLayout
android:id="@+id/loginOutRL"
android:layout_width="match_parent"
@@ -187,6 +186,7 @@
android:layout_marginRight="15dp"
android:src="@drawable/ic_right" />
</RelativeLayout>
+
<RelativeLayout
android:id="@+id/versionRL"
android:layout_width="match_parent"
@@ -205,7 +205,6 @@
android:textSize="@dimen/my_item_text_size" />
-
<TextView
android:id="@+id/versionText"
android:layout_width="wrap_content"
@@ -217,7 +216,6 @@
android:textColor="@color/text_color"
android:textSize="15sp" />
</RelativeLayout>
-
</RelativeLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_issue.xml b/app/src/main/res/layout/item_issue.xml
new file mode 100644
index 0000000..b76fccc
--- /dev/null
+++ b/app/src/main/res/layout/item_issue.xml
@@ -0,0 +1,266 @@
+<layout xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <data>
+
+ <variable
+ name="itemclidk"
+ type="com.dayu.pipirrapp.activity.IssueListActivity" />
+
+ <variable
+ name="data"
+ type="com.dayu.pipirrapp.bean.net.IssueResult" />
+ </data>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginBottom="10dp"
+ android:background="@drawable/ic_choose_gray_edge"
+ android:onClick="@{()->itemclidk.startDetail(data.issueReportId)}"
+ android:orientation="vertical"
+ android:padding="10dp">
+
+ <RelativeLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:minHeight="30dp"
+ android:orientation="horizontal">
+
+ <ImageView
+ android:id="@+id/ic_project"
+ android:layout_width="20dp"
+ android:layout_height="20dp"
+ android:layout_centerVertical="true"
+ android:layout_marginRight="10dp"
+ android:src="@drawable/ic_issue" />
+
+ <TextView
+ android:id="@+id/projectName"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_centerVertical="true"
+
+ android:layout_marginEnd="15dp"
+ android:layout_toStartOf="@+id/stateText"
+ android:layout_toEndOf="@+id/ic_project"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@{data.issueReportId}"
+ android:textColor="@color/title_color"
+ android:textSize="@dimen/manage_item_text_size" />
+
+
+ <TextView
+ android:id="@+id/stateText"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:background="@drawable/ic_edt_gray_bg"
+ android:gravity="center"
+ android:paddingLeft="10dp"
+ android:paddingTop="5dp"
+ android:paddingRight="10dp"
+ android:paddingBottom="5dp"
+ android:text="@{data.state}"
+ android:textColor="@color/black"
+ android:textSize="@dimen/manage_item_text_state_size" />
+
+
+ </RelativeLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:orientation="horizontal">
+
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1">
+
+ <TextView
+ android:id="@+id/daiShenPiTag"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="涓婃姤鍐呭锛�"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+
+ <TextView
+ android:id="@+id/daiShenPi"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@{data.content}"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+ </LinearLayout>
+
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingRight="5dp">
+
+ <TextView
+
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="涓婃姤鏃堕棿锛�"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+
+ <TextView
+ android:id="@+id/xiangMuJianCheng"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:maxLines="1"
+ android:text="@{data.reportTime}"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+ </LinearLayout>
+
+
+ </LinearLayout>
+
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:id="@+id/replyContentLL"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:gravity="center_vertical"
+ android:orientation="horizontal"
+ android:paddingRight="5dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent"
+ android:text="鍥炲鍐呭锛�"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+
+ <TextView
+ android:id="@+id/replyContent"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:ellipsize="end"
+ android:maxLines="1"
+
+ android:text="@{data.replyContent}"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+ </LinearLayout>
+
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:gravity="center_horizontal"
+ android:orientation="horizontal">
+
+ <LinearLayout
+ android:id="@+id/replyTimeLL"
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="5dp"
+ android:layout_weight="2"
+ android:gravity="center_vertical"
+ android:orientation="horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center_vertical"
+ android:text="鍥炲鏃堕棿锛�"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+
+ <TextView
+ android:id="@+id/replyTime"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@{data.replyTime}"
+ android:textColor="@color/manage_item_text"
+ android:textSize="@dimen/manage_item_text_size" />
+
+ </LinearLayout>
+
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:layout_marginLeft="10dp"
+ android:layout_marginTop="5dp"
+ android:layout_marginRight="10dp"
+ android:layout_weight="1"
+ android:orientation="horizontal"
+ android:visibility="gone">
+
+
+ <TextView
+ android:id="@+id/lookDetail"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/manage_item_btn_height"
+ android:layout_weight="1"
+ android:background="@drawable/ic_blue_background"
+ android:gravity="center"
+
+ android:text="鏌ョ湅"
+ android:textColor="@color/white"
+ android:textSize="@dimen/manage_item_btn_text_size" />
+
+
+ <TextView
+ android:id="@+id/examineBtn"
+ android:layout_width="0dp"
+ android:layout_height="@dimen/manage_item_btn_height"
+ android:layout_marginLeft="15dp"
+ android:layout_weight="1"
+ android:background="@drawable/ic_blue_background"
+ android:gravity="center"
+
+ android:text="瀹℃壒"
+ android:textColor="@color/white"
+ android:textSize="@dimen/manage_item_btn_text_size" />
+
+
+ </LinearLayout>
+ </LinearLayout>
+
+ </LinearLayout>
+</layout>
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 8ceb6d4..83f72ff 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -3,6 +3,7 @@
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="base_blue">#3D8BFF</color>
+ <color name="base_red">#FF6666</color>
<color name="down_blue">#3a68fc</color>
<color name="down_green_up">#00cc00</color>
<color name="down_green_down">#006600</color>
@@ -23,7 +24,7 @@
<color name="manage_item_time">#AAAAAA</color>
<color name="app_color_f6">#f6f6f6</color>
<color name="app_color_white">#FFFFFF</color>
- <color name="inspect_text_color_close">#ff0000</color>
+ <color name="inspect_text_color_close">#FF6666</color>
<color name="inspect_text_color_pause">#7fff00</color>
<color name="inspect_rl_bg_color">#ff6347</color>
<color name="delete_color">#ff0000</color>
--
Gitblit v1.8.0