Преглед изворни кода

添加举报和屏蔽功能(假的)

huping пре 1 година
родитељ
комит
49b4ad2442
21 измењених фајлова са 555 додато и 33 уклоњено
  1. 31 8
      TMessagesProj/src/main/java/org/telegram/cricdit/adapter/NewsAdapter.java
  2. 29 0
      TMessagesProj/src/main/java/org/telegram/cricdit/adapter/ReportAdapter.java
  3. 14 0
      TMessagesProj/src/main/java/org/telegram/cricdit/bean/ReportBean.java
  4. 8 0
      TMessagesProj/src/main/java/org/telegram/cricdit/bean/ShieldIdListBean.java
  5. 76 4
      TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsFragment.java
  6. 88 0
      TMessagesProj/src/main/java/org/telegram/cricdit/view/popup/ChooeseBottomPopup.java
  7. 96 0
      TMessagesProj/src/main/java/org/telegram/cricdit/view/popup/ReportBottomPopup.java
  8. BIN
      TMessagesProj/src/main/res/drawable-hdpi/msg_report2.png
  9. BIN
      TMessagesProj/src/main/res/drawable-xxhdpi/msg_report3.png
  10. BIN
      TMessagesProj/src/main/res/drawable-xxhdpi/msg_shield.png
  11. 1 1
      TMessagesProj/src/main/res/drawable/base_shape_dialog_bg.xml
  12. 5 0
      TMessagesProj/src/main/res/drawable/shape_report_bg.xml
  13. 5 0
      TMessagesProj/src/main/res/drawable/shape_report_confirm.xml
  14. 18 18
      TMessagesProj/src/main/res/layout/base_dialog_confirm.xml
  15. 4 2
      TMessagesProj/src/main/res/layout/item_news_head.xml
  16. 9 0
      TMessagesProj/src/main/res/layout/item_news_singer_img.xml
  17. 42 0
      TMessagesProj/src/main/res/layout/item_report.xml
  18. 72 0
      TMessagesProj/src/main/res/layout/layout_chooese_bottom_popup.xml
  19. 49 0
      TMessagesProj/src/main/res/layout/layout_report_bottom_popup.xml
  20. 5 0
      TMessagesProj/src/main/res/values/styles.xml
  21. 3 0
      TMessagesProj_App/build.gradle

+ 31 - 8
TMessagesProj/src/main/java/org/telegram/cricdit/adapter/NewsAdapter.java

@@ -81,6 +81,9 @@ public class NewsAdapter extends RecyclerView.Adapter {
     private int currentAccount;
     private GradientDrawable gd;
 
+    public List<NewsBean.NewsFeedBean> getData() {
+        return mList;
+    }
 
     public NewsAdapter(List<NewsBean.NewsFeedBean> data, BaseFragment fragment, NewsPresenter presenter, String newsType) {
         this.fragment = fragment;
@@ -144,7 +147,7 @@ public class NewsAdapter extends RecyclerView.Adapter {
         }
     }
 
-    private void onBindTop(NewsBean.NewsFeedBean bean, NewsAdapter.TopViewHolder mHolder, int position){
+    private void onBindTop(NewsBean.NewsFeedBean bean, NewsAdapter.TopViewHolder mHolder, int position) {
         mHolder.tvTime.setText(TimeUtils.timeFromNow(mContext, Long.parseLong(bean.getPublishTime() + "000")));
         String nickname = StringUtils.nameJudge(bean.getFirst_name(), bean.getLast_name());
         mHolder.tvUserName.setText(!TextUtils.isEmpty(nickname) ? nickname : TextUtils.isEmpty(bean.getUserName()) ? "" : bean.getUserName());
@@ -229,6 +232,13 @@ public class NewsAdapter extends RecyclerView.Adapter {
     }
 
     private void onBindNormal(NewsBean.NewsFeedBean bean, ViewHolder mHolder, int position) {
+
+        mHolder.ivReport.setOnClickListener(v -> {
+            if (mOnReportClickListener != null) {
+                mOnReportClickListener.report(bean.getUserId() + "", mHolder.tvUserName.getText().toString().trim() + "");
+            }
+        });
+
         mHolder.tvMsgNum.setText(bean.getCommentNum() + "");
         mHolder.tvLikeNum.setText(bean.getLikeNum() + "");
         mHolder.tvUserSign.setText(TextUtils.isEmpty(bean.getUserBio()) ? mContext.getString(R.string.no_signature) : bean.getUserBio());
@@ -476,11 +486,11 @@ public class NewsAdapter extends RecyclerView.Adapter {
         //评论数>=百万以百万为单位
         mHolder.tvMsgNum.setVisibility(bean.getCommentNum() > 0 ? View.VISIBLE : View.GONE);
         mHolder.ivHot.setVisibility(View.GONE);
-        if(bean.getCommentNum() >= 1000000){//1000000
+        if (bean.getCommentNum() >= 1000000) {//1000000
             mHolder.ivHot.setVisibility(View.VISIBLE);
-            mHolder.tvMsgNum.setText( bean.getCommentNum()/1000000 + "M+");
-        }else{
-            mHolder.tvMsgNum.setText( bean.getCommentNum() + "");
+            mHolder.tvMsgNum.setText(bean.getCommentNum() / 1000000 + "M+");
+        } else {
+            mHolder.tvMsgNum.setText(bean.getCommentNum() + "");
         }
 
         mHolder.tvDate.setText(TimeUtils.timeFromNow(mContext, Long.parseLong(bean.getPublishTime() + "000")));
@@ -563,7 +573,7 @@ public class NewsAdapter extends RecyclerView.Adapter {
     private class ViewHolder extends RecyclerView.ViewHolder {
         TextView tvMsgNum, tvLikeNum, tvShare, tvTime, tvUserName, tvUserSign, tvFollow;
         NineGridView nineGridView;
-        ImageView ivSinger, ivHead, ivVideo, ivHeart;
+        ImageView ivSinger, ivHead, ivVideo, ivHeart, ivReport;
         TextView tvContent;
         LinearLayout llHead, llFollow;
         TagFlowLayout flowLayout;
@@ -590,6 +600,7 @@ public class NewsAdapter extends RecyclerView.Adapter {
             ivVideo = itemView.findViewById(R.id.iv_video);
             rlVideo = itemView.findViewById(R.id.rl_video);
             view = itemView.findViewById(R.id.view_line);
+            ivReport = itemView.findViewById(R.id.tv_report);
             initView();
         }
 
@@ -603,7 +614,7 @@ public class NewsAdapter extends RecyclerView.Adapter {
 
     private class ShortViewHolder extends RecyclerView.ViewHolder {
         TextView tvDate, tvUserName, tvMsgNum, tvContent;
-        ImageView ivRight,ivHot;
+        ImageView ivRight, ivHot;
         View view;
 
         public ShortViewHolder(@NonNull View itemView) {
@@ -625,7 +636,7 @@ public class NewsAdapter extends RecyclerView.Adapter {
     }
 
     private class TopViewHolder extends RecyclerView.ViewHolder {
-        TextView tvTime, tvUserName,tvContent,tvTitle;
+        TextView tvTime, tvUserName, tvContent, tvTitle;
         ImageView ivSinger, ivVideo;
         TagFlowLayout flowLayout;
         RelativeLayout rlVideo;
@@ -706,4 +717,16 @@ public class NewsAdapter extends RecyclerView.Adapter {
             }
         }
     }
+
+
+    private OnReportClickListener mOnReportClickListener;
+
+    public void setOnReportClickListener(OnReportClickListener onReportClickListener) {
+        mOnReportClickListener = onReportClickListener;
+    }
+
+    public interface OnReportClickListener {
+        void report(String id, String username);
+    }
+
 }

+ 29 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/adapter/ReportAdapter.java

@@ -0,0 +1,29 @@
+package org.telegram.cricdit.adapter;
+
+import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.chad.library.adapter.base.BaseViewHolder;
+import com.google.android.material.checkbox.MaterialCheckBox;
+
+import org.telegram.cricdit.bean.ReportBean;
+import org.telegram.messenger.R;
+
+import java.util.List;
+
+public class ReportAdapter extends BaseQuickAdapter<ReportBean, BaseViewHolder> {
+    public ReportAdapter(int layoutResId, @Nullable List<ReportBean> data) {
+        super(layoutResId, data);
+    }
+
+    @Override
+    protected void convert(@NonNull BaseViewHolder helper, ReportBean item) {
+        helper.setText(R.id.report_content, item.title);
+
+        MaterialCheckBox checkBox = helper.getView(R.id.report_checkbox);
+        checkBox.setClickable(false);
+        checkBox.setChecked(item.isChecked);
+
+    }
+}

+ 14 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/bean/ReportBean.java

@@ -0,0 +1,14 @@
+package org.telegram.cricdit.bean;
+
+public class ReportBean {
+
+    public ReportBean(String title, boolean isChecked) {
+        this.title = title;
+        this.isChecked = isChecked;
+    }
+
+    public String title;
+
+    public boolean isChecked;
+
+}

+ 8 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/bean/ShieldIdListBean.java

@@ -0,0 +1,8 @@
+package org.telegram.cricdit.bean;
+
+import java.util.List;
+
+public class ShieldIdListBean {
+
+    public List<String> shieldIdsList;
+}

+ 76 - 4
TMessagesProj/src/main/java/org/telegram/cricdit/ui/NewsFragment.java

@@ -2,15 +2,22 @@ package org.telegram.cricdit.ui;
 
 import android.content.Context;
 import android.os.Bundle;
+import android.text.TextUtils;
 import android.view.View;
 import android.view.ViewConfiguration;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
+
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
+
+import com.lxj.xpopup.XPopup;
+import com.lxj.xpopup.interfaces.OnSelectListener;
+import com.lxj.xpopup.util.XPopupUtils;
 import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import com.scwang.smart.refresh.layout.api.RefreshLayout;
 import com.scwang.smart.refresh.layout.listener.OnLoadMoreListener;
+
 import org.greenrobot.eventbus.Subscribe;
 import org.greenrobot.eventbus.ThreadMode;
 import org.telegram.cricdit.adapter.NewsAdapter;
@@ -18,15 +25,24 @@ import org.telegram.cricdit.bean.BaseViewFragment;
 import org.telegram.cricdit.bean.NewsBean;
 import org.telegram.cricdit.bean.NewsItemEvent;
 import org.telegram.cricdit.bean.NewsMsgEvent;
+import org.telegram.cricdit.bean.ShieldIdListBean;
 import org.telegram.cricdit.mvp.NewsPresenter;
 import org.telegram.cricdit.mvp.NewsView;
 import org.telegram.cricdit.utils.ACache;
 import org.telegram.cricdit.utils.ColorUtil;
 import org.telegram.cricdit.utils.EventBusHelper;
+import org.telegram.cricdit.utils.GsonHel;
+import org.telegram.cricdit.utils.SPUtils;
+import org.telegram.cricdit.view.popup.ChooeseBottomPopup;
+import org.telegram.cricdit.view.popup.ReportBottomPopup;
 import org.telegram.messenger.R;
 import org.telegram.messenger.UserConfig;
 import org.telegram.ui.ActionBar.BaseFragment;
+import org.telegram.ui.Components.AlertsCreator;
+
 import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
 
 public class NewsFragment implements BaseViewFragment, NewsView {
     public View view;
@@ -65,10 +81,29 @@ public class NewsFragment implements BaseViewFragment, NewsView {
         smartRefreshlayout.setVisibility(View.VISIBLE);
         smartRefreshlayout.finishRefresh();
         smartRefreshlayout.finishLoadMore();
+
+        List<NewsBean.NewsFeedBean> list = mList.getList();
+
+        String shieldIds = SPUtils.getInstance().get("shield_ids", "");
+        if (!TextUtils.isEmpty(shieldIds)) {
+            ShieldIdListBean shieldIdListBean = GsonHel.fromJson(shieldIds,ShieldIdListBean.class);
+            if (shieldIdListBean.shieldIdsList.size()>0) {
+                for (String userID : shieldIdListBean.shieldIdsList) {
+                    Iterator<NewsBean.NewsFeedBean> iterator =list.iterator();
+                    while (iterator.hasNext()) {
+                        NewsBean.NewsFeedBean next = iterator.next();
+                        if ((next.getUserId()).equals(userID)) {
+                            iterator.remove();
+                        }
+                    }
+                }
+            }
+        }
+
         if (offset == 0) {
-            adapter.setData(mList.getList());
+            adapter.setData(list);
         } else {
-            adapter.addData(mList.getList());
+            adapter.addData(list);
         }
     }
 
@@ -146,6 +181,30 @@ public class NewsFragment implements BaseViewFragment, NewsView {
             NewsDetailCommentFragment.newsBean = bean;
             mFragment.presentFragment(new NewsDetailCommentFragment(new Bundle()));
         });
+
+        adapter.setOnReportClickListener((id, username) -> new XPopup.Builder(mFragment.getContext())
+                .moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面
+                .enableDrag(true)
+                .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
+                .asCustom(new ChooeseBottomPopup(mFragment.getContext(), id, username, userID -> {
+                    String shieldIds = SPUtils.getInstance().get("shield_ids", "");
+                    if (TextUtils.isEmpty(shieldIds)) {
+                        ShieldIdListBean shieldIdListBean = new ShieldIdListBean();
+                        shieldIdListBean.shieldIdsList = new ArrayList<>();
+                        shieldIdListBean.shieldIdsList.add(userID);
+                        SPUtils.getInstance().save("shield_ids", GsonHel.toJson(shieldIdListBean));
+                        shieldData(userID);
+                    } else {
+                        ShieldIdListBean shieldIdListBean = GsonHel.fromJson(shieldIds, ShieldIdListBean.class);
+                        if (shieldIdListBean != null && shieldIdListBean.shieldIdsList != null && !shieldIdListBean.shieldIdsList.contains(userID)) {
+                            shieldIdListBean.shieldIdsList.add(userID);
+                            SPUtils.getInstance().save("shield_ids", GsonHel.toJson(shieldIdListBean));
+                            shieldData(userID);
+                        }
+                    }
+                }))
+                .show());
+
         mRecyclerView.setAdapter(adapter);
 
         smartRefreshlayout.setOnRefreshListener(refreshLayout -> {
@@ -171,11 +230,11 @@ public class NewsFragment implements BaseViewFragment, NewsView {
             @Override
             public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
                 super.onScrolled(recyclerView, dx, dy);
-                if(distance < -ViewConfiguration.getTouchSlop() && !topVisible){
+                if (distance < -ViewConfiguration.getTouchSlop() && !topVisible) {
                     ivBackTop.setVisibility(View.VISIBLE);
                     distance = 0;
                     topVisible = true;
-                }else if(distance > ViewConfiguration.getTouchSlop() && topVisible){
+                } else if (distance > ViewConfiguration.getTouchSlop() && topVisible) {
                     ivBackTop.setVisibility(View.GONE);
                     distance = 0;
                     topVisible = false;
@@ -195,6 +254,19 @@ public class NewsFragment implements BaseViewFragment, NewsView {
         initData();
     }
 
+    private List<NewsBean.NewsFeedBean> shieldData(String userID) {
+        List<NewsBean.NewsFeedBean> data = adapter.getData();
+        Iterator<NewsBean.NewsFeedBean> iterator = data.iterator();
+        while (iterator.hasNext()) {
+            NewsBean.NewsFeedBean next = iterator.next();
+            if ((next.getUserId() + "").equals(userID)) {
+                iterator.remove();
+            }
+        }
+        adapter.notifyDataSetChanged();
+        return data;
+    }
+
     @Override
     public View getView() {
         return view;

+ 88 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/view/popup/ChooeseBottomPopup.java

@@ -0,0 +1,88 @@
+package org.telegram.cricdit.view.popup;
+
+import android.content.Context;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.constraintlayout.widget.Group;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.lxj.xpopup.XPopup;
+import com.lxj.xpopup.core.BottomPopupView;
+
+import org.telegram.cricdit.adapter.ReportAdapter;
+import org.telegram.cricdit.bean.ReportBean;
+import org.telegram.cricdit.utils.DialogUtils;
+import org.telegram.messenger.R;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ChooeseBottomPopup extends BottomPopupView {
+
+    private RecyclerView mRecyclerView;
+
+    private String mUsername;
+    private String mUserID;
+
+    private OnShieldConfirmClickListener mOnShieldConfirmClickListener;
+
+    public ChooeseBottomPopup(@NonNull Context context,String userID, String username,OnShieldConfirmClickListener onShieldConfirmClickListener) {
+        super(context);
+        mUsername = username;
+        mUserID = userID;
+        mOnShieldConfirmClickListener = onShieldConfirmClickListener;
+    }
+
+    @Override
+    protected int getImplLayoutId() {
+        return R.layout.layout_chooese_bottom_popup;
+    }
+
+
+    @Override
+    protected void onCreate() {
+        super.onCreate();
+
+        TextView reportGroup = findViewById(R.id.chooese_report_tv);
+        TextView shieldGroup = findViewById(R.id.chooese_shield_tv);
+
+        reportGroup.setOnClickListener(v -> showReportList());
+        shieldGroup.setOnClickListener(v -> shieldDialog());
+
+        ImageView reportIv = findViewById(R.id.chooese_report_iv);
+        ImageView shieldIv = findViewById(R.id.chooese_shield_iv);
+
+        reportIv.setOnClickListener(v -> showReportList());
+        shieldIv.setOnClickListener(v -> shieldDialog());
+    }
+
+    public void showReportList() {
+        dismiss();
+        new XPopup.Builder(getContext())
+                .moveUpToKeyboard(false) //如果不加这个,评论弹窗会移动到软键盘上面
+                .enableDrag(true)
+                .isDestroyOnDismiss(true) //对于只使用一次的弹窗,推荐设置这个
+                .asCustom(new ReportBottomPopup(getContext()))
+                .show();
+    }
+
+    public void shieldDialog() {
+        dismiss();
+        DialogUtils.getConfirmDialog(getContext(), () -> {
+            if (mOnShieldConfirmClickListener!=null) {
+                mOnShieldConfirmClickListener.click(mUserID);
+            }
+        }, "Shield " + mUsername + "?", "You will not be able to see information about " + mUsername);
+    }
+
+
+    public interface OnShieldConfirmClickListener{
+        void click(String userID);
+    }
+
+}

+ 96 - 0
TMessagesProj/src/main/java/org/telegram/cricdit/view/popup/ReportBottomPopup.java

@@ -0,0 +1,96 @@
+package org.telegram.cricdit.view.popup;
+
+import android.content.Context;
+import android.view.View;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.LinearLayoutManager;
+import androidx.recyclerview.widget.RecyclerView;
+
+import com.chad.library.adapter.base.BaseQuickAdapter;
+import com.lxj.xpopup.core.BottomPopupView;
+
+import org.telegram.cricdit.adapter.ReportAdapter;
+import org.telegram.cricdit.bean.ReportBean;
+import org.telegram.cricdit.utils.ToastUtil;
+import org.telegram.messenger.AndroidUtilities;
+import org.telegram.messenger.R;
+import org.telegram.ui.ActionBar.AlertDialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ReportBottomPopup extends BottomPopupView {
+
+    private RecyclerView mRecyclerView;
+    private TextView mConfirm;
+    private AlertDialog mAlertDialog;
+
+    public ReportBottomPopup(@NonNull Context context) {
+        super(context);
+    }
+
+    @Override
+    protected int getImplLayoutId() {
+        return R.layout.layout_report_bottom_popup;
+    }
+
+
+    @Override
+    protected void onCreate() {
+        super.onCreate();
+        mAlertDialog = new AlertDialog(getContext(), 3);
+        mRecyclerView = findViewById(R.id.report_recycler_view);
+        mConfirm = findViewById(R.id.report_confirm);
+        mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
+
+        List<ReportBean> reportBeanList = new ArrayList<>();
+
+//        for (int i = 0; i < 6; i++) {
+//            boolean isChecked;
+//            if (i == 0) {
+//                isChecked = true;
+//            } else {
+//                isChecked = false;
+//            }
+//            reportBeanList.add(new ReportBean("辱骂、谩骂" + i, isChecked));
+//        }
+        reportBeanList.add(new ReportBean("Child Endangerment", true));
+        reportBeanList.add(new ReportBean("Sexual Content and Profanity", false));
+        reportBeanList.add(new ReportBean("Hate Speech", false));
+        reportBeanList.add(new ReportBean("Violence", false));
+        reportBeanList.add(new ReportBean("Terrorist Content", false));
+        reportBeanList.add(new ReportBean("Dangerous Organizations and Movements", false));
+        reportBeanList.add(new ReportBean("Sensitive Events", false));
+        reportBeanList.add(new ReportBean("Other", false));
+
+
+        ReportAdapter adapter = new ReportAdapter(R.layout.item_report, reportBeanList);
+        mRecyclerView.setAdapter(adapter);
+
+        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
+            @Override
+            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
+                for (ReportBean reportBean : reportBeanList) {
+                    reportBean.isChecked = false;
+                }
+                reportBeanList.get(position).isChecked = true;
+                adapter.notifyDataSetChanged();
+            }
+        });
+
+        mConfirm.setOnClickListener(v -> {
+            mAlertDialog.show();
+            AndroidUtilities.runOnUIThread(new Runnable() {
+                @Override
+                public void run() {
+                    mAlertDialog.dismiss();
+                    ToastUtil.show(getContext(), "We have received your report, thank you");
+                    dismiss();
+                }
+            }, 2000);
+        });
+
+    }
+}

BIN
TMessagesProj/src/main/res/drawable-hdpi/msg_report2.png


BIN
TMessagesProj/src/main/res/drawable-xxhdpi/msg_report3.png


BIN
TMessagesProj/src/main/res/drawable-xxhdpi/msg_shield.png


+ 1 - 1
TMessagesProj/src/main/res/drawable/base_shape_dialog_bg.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
     android:shape="rectangle">
-    <corners android:radius="10dp" />
+    <corners android:radius="8dp" />
     <solid android:color="#ffffff" />
 </shape>

+ 5 - 0
TMessagesProj/src/main/res/drawable/shape_report_bg.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+<corners android:topLeftRadius="15dp" android:topRightRadius="15dp"/>
+    <solid android:color="@color/colorWhite"/>
+</shape>

+ 5 - 0
TMessagesProj/src/main/res/drawable/shape_report_confirm.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
+<corners android:radius="20dp"/>
+    <solid android:color="@color/colorBlue"/>
+</shape>

+ 18 - 18
TMessagesProj/src/main/res/layout/base_dialog_confirm.xml

@@ -4,8 +4,8 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:background="@drawable/base_shape_dialog_bg"
-    android:paddingTop="27dp"
-    android:paddingBottom="27dp">
+    android:paddingTop="20dp"
+    android:paddingBottom="8dp">
 
     <TextView
         android:id="@+id/dialog_confirm_title"
@@ -15,7 +15,7 @@
         android:layout_marginEnd="32dp"
         android:gravity="center"
         android:textColor="#333333"
-        android:textSize="20sp"
+        android:textSize="16sp"
         android:textStyle="bold"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -31,7 +31,7 @@
         android:gravity="center"
         android:text=""
         android:textColor="#000000"
-        android:textSize="16sp"
+        android:textSize="14sp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@id/dialog_confirm_title" />
@@ -41,31 +41,31 @@
         android:id="@+id/dialog_confirm_cancel"
         android:layout_width="wrap_content"
         android:layout_height="40dp"
-        android:layout_marginTop="40dp"
-        android:background="@drawable/base_shap_dialog_btn_cancel"
+        android:paddingStart="16dp"
+        android:paddingEnd="16dp"
+        android:layout_marginTop="20dp"
         android:gravity="center"
-        android:minWidth="110dp"
-        android:text="@string/dialog_confirm_cancel"
-        android:textColor="#DC3C23"
-        android:textSize="16sp"
+        android:text="CANCEL"
+        android:textStyle="bold"
+        android:textColor="@color/colorBlue"
+        android:textSize="14sp"
         app:layout_constraintEnd_toStartOf="@id/dialog_confirm_confirm"
-        app:layout_constraintHorizontal_chainStyle="spread"
-        app:layout_constraintStart_toStartOf="parent"
         app:layout_constraintTop_toBottomOf="@id/dialog_confirm_content" />
 
     <TextView
         android:id="@+id/dialog_confirm_confirm"
         android:layout_width="wrap_content"
         android:layout_height="40dp"
-        android:background="@drawable/base_shap_dialog_btn_confirm"
         android:gravity="center"
-        android:minWidth="110dp"
-        android:text="@string/dialog_confirm_confirm"
-        android:textColor="#ffffff"
-        android:textSize="16sp"
+        android:textStyle="bold"
+        android:layout_marginEnd="8dp"
+        android:paddingStart="16dp"
+        android:paddingEnd="16dp"
+        android:text="CONFIRM"
+        android:textColor="@color/colorBlue"
+        android:textSize="14sp"
         app:layout_constraintBottom_toBottomOf="@id/dialog_confirm_cancel"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toEndOf="@id/dialog_confirm_cancel"
         app:layout_constraintTop_toTopOf="@id/dialog_confirm_cancel" />
 
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 4 - 2
TMessagesProj/src/main/res/layout/item_news_head.xml

@@ -32,14 +32,16 @@
             style="@style/TvNameStyle"/>
 
         <TextView
+            android:textSize="12sp"
+            android:textColor="@color/c_A0A4A7"
             android:id="@+id/tv_user_sign"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="2dp"
+            android:lineSpacingExtra="4dp"
             android:maxLines="1"
             android:ellipsize="end"
-            style="@style/TvDateStyle"/>
-
+            />
     </LinearLayout>
 
     <include layout="@layout/btn_follow"/>

+ 9 - 0
TMessagesProj/src/main/res/layout/item_news_singer_img.xml

@@ -104,6 +104,15 @@
             android:drawableLeft="@drawable/icon_news_share"
             android:drawablePadding="7dp"
             android:textSize="@dimen/sp_14"/>
+        <ImageView
+            android:id="@+id/tv_report"
+            android:layout_width="30dp"
+            android:layout_height="40dp"
+            android:paddingTop="11dp"
+            android:paddingEnd="11dp"
+            android:paddingBottom="11dp"
+            android:src="@drawable/msg_report2"
+            />
 
         <TextView
             android:id="@+id/tv_time"

+ 42 - 0
TMessagesProj/src/main/res/layout/item_report.xml

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <TextView
+        android:id="@+id/report_content"
+        android:layout_width="0dp"
+        android:lines="1"
+        android:ellipsize="end"
+        android:singleLine="true"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="14dp"
+        android:layout_marginTop="14dp"
+        android:textStyle="bold"
+        android:gravity="center|start"
+        android:textColor="@color/colorBlack"
+        android:textSize="14sp"
+        android:layout_marginEnd="5dp"
+        app:layout_constraintEnd_toStartOf="@id/report_checkbox"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.google.android.material.checkbox.MaterialCheckBox
+        android:id="@+id/report_checkbox"
+        android:theme="@style/My_CheckBox"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="14dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginTop="14dp"
+        android:background="@color/line_color"
+        app:layout_constraintTop_toBottomOf="@id/report_content" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 72 - 0
TMessagesProj/src/main/res/layout/layout_chooese_bottom_popup.xml

@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/shape_report_bg">
+
+    <ImageView
+        android:id="@+id/chooese_report_iv"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:layout_marginStart="6dp"
+        android:padding="13dp"
+        android:src="@drawable/msg_report3"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <TextView
+        android:id="@+id/chooese_report_tv"
+        android:layout_width="0dp"
+        android:layout_height="50dp"
+        android:gravity="center|start"
+        android:paddingStart="6dp"
+        android:text="Report"
+        android:textColor="@color/colorBlack"
+        android:textSize="15sp"
+        android:textStyle="bold"
+        app:layout_constraintBottom_toBottomOf="@id/chooese_report_iv"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/chooese_report_iv"
+        app:layout_constraintTop_toTopOf="@id/chooese_report_iv" />
+
+    <View
+        android:id="@+id/report_underline1"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/line_color"
+        app:layout_constraintTop_toBottomOf="@id/chooese_report_iv" />
+
+    <ImageView
+        android:id="@+id/chooese_shield_iv"
+        android:layout_width="50dp"
+        android:layout_height="50dp"
+        android:layout_marginStart="6dp"
+        android:padding="12dp"
+        android:src="@drawable/msg_shield"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/report_underline1" />
+
+    <TextView
+        android:id="@+id/chooese_shield_tv"
+        android:layout_width="0dp"
+        android:layout_height="50dp"
+        android:gravity="center|start"
+        android:paddingStart="6dp"
+        android:text="Shield"
+        android:textColor="@color/colorBlack"
+        android:textSize="15sp"
+        android:textStyle="bold"
+        app:layout_constraintBottom_toBottomOf="@id/chooese_shield_iv"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/chooese_shield_iv"
+        app:layout_constraintTop_toTopOf="@id/chooese_shield_iv" />
+
+    <View
+        android:id="@+id/report_underline2"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/line_color"
+        app:layout_constraintTop_toBottomOf="@id/chooese_shield_iv" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 49 - 0
TMessagesProj/src/main/res/layout/layout_report_bottom_popup.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/shape_report_bg">
+
+    <TextView
+        android:id="@+id/report_title"
+        android:layout_width="match_parent"
+        android:layout_height="50dp"
+        android:gravity="center"
+        android:text="Report"
+        android:textColor="@color/colorBlack"
+        android:textSize="16sp"
+        android:textStyle="bold"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <View
+        android:id="@+id/report_underline1"
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="@color/line_color"
+        app:layout_constraintTop_toBottomOf="@id/report_title" />
+
+    <androidx.recyclerview.widget.RecyclerView
+        android:id="@+id/report_recycler_view"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:overScrollMode="never"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/report_underline1" />
+
+    <TextView
+        android:id="@+id/report_confirm"
+        android:layout_width="120dp"
+        android:layout_height="35dp"
+        android:layout_marginTop="16dp"
+        android:background="@drawable/shape_report_confirm"
+        android:gravity="center"
+        android:text="Confirm"
+        android:textColor="@color/colorWhite"
+        android:textSize="14sp"
+        android:textStyle="bold"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/report_recycler_view" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>

+ 5 - 0
TMessagesProj/src/main/res/values/styles.xml

@@ -33,6 +33,11 @@
         <item name="android:windowCloseOnTouchOutside">false</item>
     </style>
 
+    <style name="My_CheckBox" parent="Theme.AppCompat.Light">
+        <item name="colorControlActivated">@color/colorBlue</item>
+        <item name="colorControlNormal">@color/colorGray2</item>
+    </style>
+
     <!-- Base application theme. -->
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
         <item name="colorPrimary">@color/colorPrimary</item>

+ 3 - 0
TMessagesProj_App/build.gradle

@@ -113,6 +113,9 @@ android {
             multiDexEnabled true
             proguardFiles getDefaultProguardFile('proguard-android.txt'), '../TMessagesProj/proguard-rules.pro'
             ndk.debugSymbolLevel = 'FULL'
+
+            aaptOptions.cruncherEnabled = false
+            aaptOptions.useNewCruncher = false
         }
     }