diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml
index e55cd1990..b1ca29277 100644
--- a/common/src/main/res/values-zh/strings.xml
+++ b/common/src/main/res/values-zh/strings.xml
@@ -554,10 +554,11 @@
TA還沒有視頻作品
我的視頻
選擇舉報理由
- 更多詳細資訊請在說明框中描述(選填)
+ 更多內容請在說明框中描述(必填)
提交
請選擇舉報理由
舉報成功
+ 請填寫舉報内容
已經到頂了哦
確定刪除上一段視頻?
是否退出視頻編輯
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 555dca1eb..2176c897e 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -617,10 +617,11 @@
TA has no video works yet
My video
Choose a reason to report
- For more details, please describe in the description box (optional)
+ More content should be described in the description box (required)
Submission
Please select the reason for reporting
Report success
+ Please fill in the report
It\'s at the top
Are you sure you want to delete the previous video?
Exit video editing
diff --git a/live/src/main/java/com/yunbao/live/activity/ReportSecondActivity.java b/live/src/main/java/com/yunbao/live/activity/ReportSecondActivity.java
new file mode 100644
index 000000000..c43e8a3b9
--- /dev/null
+++ b/live/src/main/java/com/yunbao/live/activity/ReportSecondActivity.java
@@ -0,0 +1,248 @@
+package com.yunbao.live.activity;
+
+import android.graphics.Color;
+import android.text.Editable;
+import android.text.SpannableString;
+import android.text.Spanned;
+import android.text.TextUtils;
+import android.text.TextWatcher;
+import android.text.style.ForegroundColorSpan;
+import android.view.View;
+import android.widget.EditText;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.yunbao.common.BuildConfig;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.glide.ImgLoader;
+import com.yunbao.common.interfaces.ImageResultCallback;
+import com.yunbao.common.utils.ProcessImageUtil;
+import com.yunbao.common.utils.ToastUtil;
+import com.yunbao.live.R;
+
+import java.io.File;
+import java.util.Locale;
+
+public class ReportSecondActivity extends AbsActivity implements View.OnClickListener {
+ private TextView info_textView;
+ private EditText edit;
+ private TextView btn_report;
+ private ImageView image_1,image_2,image_3,cancel_1,cancel_2,cancel_3;
+ private ProcessImageUtil mImageUtil;
+ private int photoIndex;
+ private File mFile1, mFile2, mFile3;
+ private int uploadImageCount;
+ private String inputText;
+
+
+ @Override
+ protected int getLayoutId() {
+ return R.layout.activity_report_second;
+ }
+
+
+ @Override
+ protected void main() {
+ super.main();
+ info_textView = findViewById(R.id.info_textView);
+ edit = findViewById(R.id.edit);
+ btn_report = findViewById(R.id.btn_report);
+ image_1 = findViewById(R.id.image_1);
+ image_2 = findViewById(R.id.image_2);
+ image_3 = findViewById(R.id.image_3);
+ cancel_1 = findViewById(R.id.cancel_1);
+ cancel_2 = findViewById(R.id.cancel_2);
+ cancel_3 = findViewById(R.id.cancel_3);
+
+ imageUtilInit();
+
+ btn_report.setOnClickListener(this);
+ image_1.setOnClickListener(this);
+ image_1 .setOnClickListener(this);
+ image_2 .setOnClickListener(this);
+ image_3 .setOnClickListener(this);
+ cancel_1.setOnClickListener(this);
+ cancel_2.setOnClickListener(this);
+
+
+ edit.addTextChangedListener(new TextWatcher() {
+ @Override
+ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
+
+ }
+
+ @Override
+ public void onTextChanged(CharSequence s, int start, int before, int count) {
+
+ }
+
+ @Override
+ public void afterTextChanged(Editable s) {
+ inputText = s.toString();
+ setButtonStatus();
+ }
+ });
+ }
+
+ private void setButtonStatus(){
+ if ((inputText != null && !inputText.isEmpty()) || uploadImageCount > 0) {
+ btn_report.setEnabled(true);
+ btn_report.setBackground(getResources().getDrawable(R.drawable.border_yellow));
+ } else {
+ btn_report.setEnabled(false);
+ btn_report.setBackgroundResource(R.drawable.border_hui);
+ }
+ }
+
+ private void setInfoText(String userName) {
+ /*
+ * ○ CH:您舉報的用戶【用戶暱稱】,我們已對其進行重點觀察,並進一步判定,若發現違規將立刻處理,感謝您的監督~
+如您有任何信息證明補充,可點擊進入詳情,再次進行提交,感謝您對淨化平台環境做出的貢獻!
+ ○ EN:The user 【用戶暱稱】 you reported has been under our close observation and further judgment. If any violation is found, it will be dealt with immediately. Thank you for your supervision.
+If you have any supplementary information or proof, you can click to enter the details and submit again. Thank you for your contribution to purifying the platform environment.
+ * */
+ StringBuilder stringBuilder = new StringBuilder();
+ Locale locale = getResources().getConfiguration().locale;
+ String language = locale.getLanguage();
+ int startIndex = 0;
+ int endIndex = 0;
+ if (TextUtils.equals(language, "zh")) {
+ stringBuilder.append("您舉報的用戶【");
+ startIndex = stringBuilder.toString().length();
+ stringBuilder.append(userName);
+ endIndex = stringBuilder.toString().length();
+ stringBuilder .append("】,我們已對其進行重點觀察,並進一步判定,若發現違規將立刻處理,感謝您的監督~\n如您有任何信息證明補充,可點擊進入詳情,再次進行提交,感謝您對淨化平台環境做出的貢獻!");
+ } else {
+ stringBuilder.append("The user 【");
+ startIndex = stringBuilder.toString().length();
+ stringBuilder .append(userName);
+ endIndex = stringBuilder.toString().length();
+ stringBuilder.append("】 you reported has been under our close observation and further judgment. If any violation is found, it will be dealt with immediately. Thank you for your supervision.\nIf you have any supplementary information or proof, you can click to enter the details and submit again. Thank you for your contribution to purifying the platform environment.");
+ }
+
+ SpannableString spannableString = new SpannableString(stringBuilder.toString());
+
+ spannableString.setSpan(new ForegroundColorSpan(Color.parseColor("#FF870F")), startIndex, endIndex, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+ info_textView.setText(spannableString);
+ }
+
+
+ @Override
+ public void onClick(View v) {
+ int id = v.getId();
+ if (id == R.id.btn_report) {
+ reportSecond();
+ } else if (id == R.id.image_1) {
+ photoIndex = 0;
+ mImageUtil.getImageByAlbum();
+
+ } else if (id == R.id.image_2) {
+ photoIndex = 1;
+ mImageUtil.getImageByAlbum();
+
+
+ } else if (id == R.id.image_3) {
+ photoIndex = 2;
+ mImageUtil.getImageByAlbum();
+
+
+ } else if (id == R.id.cancel_1) {
+ uploadImageCount--;
+ mFile1 = null;
+ cancel_1.setVisibility(View.GONE);
+ ImgLoader.display(mContext, R.mipmap.upload_image, image_1);
+ setButtonStatus();
+
+
+ } else if (id == R.id.cancel_2) {
+ uploadImageCount--;
+ mFile2 = null;
+ cancel_2.setVisibility(View.GONE);
+ ImgLoader.display(mContext, R.mipmap.upload_image, image_2);
+ setButtonStatus();
+
+ } else if (id == R.id.cancel_3) {
+ uploadImageCount--;
+ mFile3 = null;
+ cancel_3.setVisibility(View.GONE);
+ ImgLoader.display(mContext, R.mipmap.upload_image, image_3);
+ setButtonStatus();
+
+ }
+ }
+
+ private void reportSecond() {
+ /*
+ *
+ * if (mIntoIndex == 0) {
+ LiveHttpUtil.setReport(mToUid, bean.getName(),text, file1, file2, file3, mVideoId, new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if (code == 0) {
+ ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
+ onBackPressed();
+ } else {
+ ToastUtil.show(msg);
+ }
+ }
+ });
+ } else {
+ CommonHttpUtil.setCommunityReport(community_type, comment_id, mToUid, text, file1, file2, file3, bean.getId(), new HttpCallback() {
+ @Override
+ public void onSuccess(int code, String msg, String[] info) {
+ if (code == 0) {
+ ToastUtil.show(mContext.getString(R.string.video_report_tip_4));
+ onBackPressed();
+ } else {
+ ToastUtil.show(msg);
+ }
+ }
+ });
+ }
+ * */
+ finish();
+
+ }
+
+
+ private void imageUtilInit() {
+ mImageUtil = new ProcessImageUtil((LiveReportActivity)mContext);
+ mImageUtil.setImageResultCallback(new ImageResultCallback() {
+ @Override
+ public void beforeCamera() {
+
+ }
+
+ @Override
+ public void onSuccess(File file) {
+ if (file != null) {
+ if (photoIndex == 0) {
+ mFile1 = file;
+ ImgLoader.display(mContext, file, image_1);
+ cancel_1.setVisibility(View.VISIBLE);
+ uploadImageCount++;
+ }
+ else if (photoIndex == 1){
+ mFile2 = file;
+ ImgLoader.display(mContext, file, image_2);
+ cancel_2.setVisibility(View.VISIBLE);
+ uploadImageCount++;
+
+ }
+ else if (photoIndex == 2){
+ mFile3 = file;
+ ImgLoader.display(mContext, file, image_3);
+ cancel_3.setVisibility(View.VISIBLE);
+ uploadImageCount++;
+
+ }
+ setButtonStatus();
+ }
+ }
+
+ @Override
+ public void onFailure() {
+ }
+ });
+ }
+}
diff --git a/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java b/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java
index bc65cadbf..f4dfc1cf9 100644
--- a/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java
+++ b/live/src/main/java/com/yunbao/live/adapter/LiveReportAdapter.java
@@ -7,6 +7,8 @@ import android.graphics.drawable.Drawable;
import androidx.annotation.NonNull;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.RecyclerView;
+
+import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -19,6 +21,7 @@ import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.ImageResultCallback;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.ProcessImageUtil;
+import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveReportActivity;
import com.yunbao.live.bean.LiveReportBean;
@@ -304,6 +307,12 @@ public class LiveReportAdapter extends RecyclerView.Adapter {
void submit() {
String text = mEditText.getText().toString().trim();
+
+ if (TextUtils.isEmpty(text)) {
+ ToastUtil.show(R.string.video_report_tip_5);
+ return;
+ }
+
if (mActionListener != null) {
// mActionListener.onReportClick(mCurVideoReportBean, text);
mActionListener.onReportClick(mCurVideoReportBean, text,mFile1,mFile2,mFile3);
diff --git a/live/src/main/res/drawable/border_hui.xml b/live/src/main/res/drawable/border_hui.xml
new file mode 100644
index 000000000..b53902982
--- /dev/null
+++ b/live/src/main/res/drawable/border_hui.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/drawable/edit_background_f7.xml b/live/src/main/res/drawable/edit_background_f7.xml
new file mode 100644
index 000000000..8a376a4a7
--- /dev/null
+++ b/live/src/main/res/drawable/edit_background_f7.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/activity_report_second.xml b/live/src/main/res/layout/activity_report_second.xml
new file mode 100644
index 000000000..7b191a948
--- /dev/null
+++ b/live/src/main/res/layout/activity_report_second.xml
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/res/layout/item_live_report_head.xml b/live/src/main/res/layout/item_live_report_head.xml
index 34c3ffe37..a196b0f08 100644
--- a/live/src/main/res/layout/item_live_report_head.xml
+++ b/live/src/main/res/layout/item_live_report_head.xml
@@ -1,11 +1,36 @@
-
+ xmlns:app="http://schemas.android.com/apk/res-auto">
+
+
+
+
+
+
+
+
diff --git a/live/src/main/res/mipmap-xxxhdpi/cancel_upload.webp b/live/src/main/res/mipmap-xxxhdpi/cancel_upload.webp
new file mode 100644
index 000000000..df399e0d7
Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/cancel_upload.webp differ
diff --git a/live/src/main/res/mipmap-xxxhdpi/upload_image.webp b/live/src/main/res/mipmap-xxxhdpi/upload_image.webp
new file mode 100644
index 000000000..82f714876
Binary files /dev/null and b/live/src/main/res/mipmap-xxxhdpi/upload_image.webp differ
diff --git a/live/src/main/res/values-zh/strings.xml b/live/src/main/res/values-zh/strings.xml
index 04f92fff9..da3a41777 100644
--- a/live/src/main/res/values-zh/strings.xml
+++ b/live/src/main/res/values-zh/strings.xml
@@ -145,4 +145,10 @@
立即前往
加入
守護任務
+
+ 舉報結果通知
+ 通知
+ 上傳圖片
+ 舉報內容補充
+ 若您有其它補充信息,請在說明框中描述~
diff --git a/live/src/main/res/values/strings.xml b/live/src/main/res/values/strings.xml
index d0dcf7d23..521ce941c 100644
--- a/live/src/main/res/values/strings.xml
+++ b/live/src/main/res/values/strings.xml
@@ -148,4 +148,10 @@
Go now
Join
Guard tasks
+
+ Notification of report result
+ Notification
+ Upload pictures
+ Report content supplement
+ If you have additional information, please describe it in the description box
\ No newline at end of file