Sheffi hace 7 meses
padre
commit
3559eb5697
Se han modificado 43 ficheros con 1681 adiciones y 253 borrados
  1. 1 0
      ybvideoandroid/common/src/main/res/values-en-rUS/strings.xml
  2. 1 0
      ybvideoandroid/common/src/main/res/values/strings.xml
  3. 1 0
      ybvideoandroid/main/build.gradle
  4. 17 18
      ybvideoandroid/main/src/main/AndroidManifest.xml
  5. 72 2
      ybvideoandroid/main/src/main/java/com/yunbao/main/activity/GoodsFilterActivity.java
  6. 190 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/activity/NewsDetailActivity.java
  7. 3 1
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/EcommerceProductAdapter.java
  8. 1 1
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/EcommerceSecondaryFilterAdapter.java
  9. 11 8
      ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/MainHomeNewsAdapter.java
  10. 39 12
      ybvideoandroid/main/src/main/java/com/yunbao/main/bean/NewsBean.java
  11. 2 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpConsts.java
  12. 17 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java
  13. 40 12
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeNewsViewHolder.java
  14. 14 14
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java
  15. 2 0
      ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainMallViewHolder.java
  16. 120 5
      ybvideoandroid/main/src/main/res/layout/activity_filter_goods.xml
  17. 129 0
      ybvideoandroid/main/src/main/res/layout/activity_news_detail.xml
  18. 75 56
      ybvideoandroid/main/src/main/res/layout/item_news_list.xml
  19. 1 0
      ybvideoandroid/main/src/main/res/values/strings.xml
  20. 3 0
      ybvideoandroid/video/build.gradle
  21. 6 2
      ybvideoandroid/video/src/main/AndroidManifest.xml
  22. 2 2
      ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoChooseActivity.java
  23. 69 8
      ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java
  24. 5 0
      ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java
  25. 2 2
      ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoRecordActivity.java
  26. 35 1
      ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoReportActivity.java
  27. 97 0
      ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoReportDescriptionActivity.java
  28. 116 100
      ybvideoandroid/video/src/main/java/com/yunbao/video/adapter/VideoReportAdapter.java
  29. 3 1
      ybvideoandroid/video/src/main/java/com/yunbao/video/bean/VideoReportBean.java
  30. 219 0
      ybvideoandroid/video/src/main/java/com/yunbao/video/views/AnimatedCircleProgress.java
  31. 157 0
      ybvideoandroid/video/src/main/java/com/yunbao/video/views/VideoLoadingViewHolder.java
  32. 9 0
      ybvideoandroid/video/src/main/res/drawable/bg_edit_text.xml
  33. 5 0
      ybvideoandroid/video/src/main/res/drawable/bg_submit.xml
  34. 3 2
      ybvideoandroid/video/src/main/res/drawable/bg_video_pub.xml
  35. 16 0
      ybvideoandroid/video/src/main/res/drawable/bg_video_report_item_selector.xml
  36. 17 0
      ybvideoandroid/video/src/main/res/drawable/bg_video_report_select.xml
  37. 2 1
      ybvideoandroid/video/src/main/res/layout/activity_video_publish.xml
  38. 2 2
      ybvideoandroid/video/src/main/res/layout/activity_video_record.xml
  39. 44 3
      ybvideoandroid/video/src/main/res/layout/activity_video_report.xml
  40. 58 0
      ybvideoandroid/video/src/main/res/layout/activity_video_report_description.xml
  41. 29 0
      ybvideoandroid/video/src/main/res/layout/item_video_report_new.xml
  42. 45 0
      ybvideoandroid/video/src/main/res/layout/view_video_loading.xml
  43. 1 0
      ybvideoandroid/video/src/main/res/values/strings.xml

+ 1 - 0
ybvideoandroid/common/src/main/res/values-en-rUS/strings.xml

@@ -773,6 +773,7 @@
 
     <string name="video_time_15">30s</string>
     <string name="video_time_60">60s</string>
+    <string name="video_time_90">90s</string>
     <string name="video_classify">Video classification</string>
     <string name="video_set_fee">Set fees</string>
     <string name="video_search_class">Search categories</string>

+ 1 - 0
ybvideoandroid/common/src/main/res/values/strings.xml

@@ -775,6 +775,7 @@
 
     <string name="video_time_15">拍30秒</string>
     <string name="video_time_60">拍60秒</string>
+    <string name="video_time_90">拍90秒</string>
     <string name="video_classify">视频分类</string>
     <string name="video_set_fee">设置收费</string>
     <string name="video_search_class">搜索分类</string>

+ 1 - 0
ybvideoandroid/main/build.gradle

@@ -37,4 +37,5 @@ dependencies {
     api project(':live')
     api project(':mall')
 
+
 }

+ 17 - 18
ybvideoandroid/main/src/main/AndroidManifest.xml

@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.yunbao.main">
 
@@ -5,14 +6,16 @@
         android:allowBackup="true"
         android:theme="@style/AppTheme">
         <activity
+            android:name=".activity.NewsDetailActivity"
+            android:exported="false" />
+        <activity
             android:name=".activity.LoginActivity"
-            android:screenOrientation="portrait"
-            />
+            android:screenOrientation="portrait" />
         <activity
             android:name=".activity.MainActivity"
+            android:configChanges="screenLayout|orientation|screenSize|keyboard|keyboardHidden"
             android:launchMode="singleTask"
             android:screenOrientation="portrait"
-            android:configChanges="screenLayout|orientation|screenSize|keyboard|keyboardHidden"
             android:windowSoftInputMode="adjustNothing|stateAlwaysHidden" />
         <activity
             android:name=".activity.ImMsgFansActivity"
@@ -20,13 +23,11 @@
         <activity
             android:name=".activity.ImMsgZanActivity"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="adjustNothing|stateAlwaysHidden"
-            />
+            android:windowSoftInputMode="adjustNothing|stateAlwaysHidden" />
         <activity
             android:name=".activity.ImMsgAtActivity"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="adjustNothing|stateAlwaysHidden"
-            />
+            android:windowSoftInputMode="adjustNothing|stateAlwaysHidden" />
         <activity
             android:name=".activity.ImMsgCommentActivity"
             android:screenOrientation="portrait"
@@ -97,8 +98,8 @@
             android:screenOrientation="portrait" />
         <activity
             android:name=".activity.VipActivity"
-            android:screenOrientation="portrait"
-            android:exported="true"/>
+            android:exported="true"
+            android:screenOrientation="portrait" />
         <activity
             android:name=".activity.CancelAccountActivity"
             android:screenOrientation="portrait" />
@@ -114,8 +115,7 @@
         <activity
             android:name=".activity.ShopApplyActivity"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="adjustPan|stateAlwaysHidden"
-            />
+            android:windowSoftInputMode="adjustPan|stateAlwaysHidden" />
         <activity
             android:name=".activity.DailyTaskActivity"
             android:screenOrientation="portrait" />
@@ -130,9 +130,8 @@
             android:screenOrientation="portrait" />
         <activity
             android:name=".activity.NameCardActivity"
-            android:screenOrientation="portrait"
             android:hardwareAccelerated="false"
-            />
+            android:screenOrientation="portrait" />
         <activity
             android:name=".activity.LiveRankActivity"
             android:screenOrientation="portrait" />
@@ -163,18 +162,18 @@
         <activity
             android:name=".activity.PwdActivity"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="stateVisible"/>
+            android:windowSoftInputMode="stateVisible" />
         <activity
             android:name=".activity.PwdInputActivity"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="stateVisible"/>
+            android:windowSoftInputMode="stateVisible" />
         <activity
             android:name=".activity.YoungOpenedActivity"
             android:screenOrientation="portrait" />
         <activity
             android:name=".activity.PwdChangeActivity"
             android:screenOrientation="portrait"
-            android:windowSoftInputMode="stateVisible"/>
+            android:windowSoftInputMode="stateVisible" />
         <activity
             android:name=".activity.RedPackProfitActivity"
             android:screenOrientation="portrait" />
@@ -205,6 +204,6 @@
         <activity
             android:name=".activity.GoodsFilterActivity"
             android:screenOrientation="portrait" />
-
     </application>
-</manifest>
+
+</manifest>

+ 72 - 2
ybvideoandroid/main/src/main/java/com/yunbao/main/activity/GoodsFilterActivity.java

@@ -19,6 +19,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
 import com.alibaba.fastjson.JSON;
+import com.yunbao.common.CommonAppConfig;
 import com.yunbao.common.activity.AbsActivity;
 import com.yunbao.common.adapter.RefreshAdapter;
 import com.yunbao.common.bean.GoodsBean;
@@ -27,6 +28,7 @@ import com.yunbao.common.custom.ItemDecoration;
 import com.yunbao.common.http.HttpCallback;
 import com.yunbao.common.interfaces.OnItemClickListener;
 import com.yunbao.common.utils.DpUtil;
+import com.yunbao.common.utils.RouteUtil;
 import com.yunbao.common.utils.ToastUtil;
 import com.yunbao.main.R;
 import com.yunbao.main.adapter.EcommercePrimaryFilterAdapter;
@@ -63,7 +65,16 @@ public class GoodsFilterActivity extends AbsActivity implements OnItemClickListe
     private static final String SORT_DESC = "desc";
     private static final String SORT_ASC = "asc";
     private static final String SORT_NONE = "";
-
+    private TextView mBtnNew;
+    private TextView mTvSale;
+    private TextView mTvPrice;
+    private ImageView mImgSale;
+    private ImageView mImgPrice;
+    private Drawable mDrawableUp;
+    private Drawable mDrawableDown;
+    private Drawable mDrawableNone;
+    private int mColor0;
+    private int mColor1;
     private EditText mEtSearch;
     private RecyclerView mRvPrimaryFilter;
     private RecyclerView mRvSecondaryFilter;
@@ -112,12 +123,27 @@ public class GoodsFilterActivity extends AbsActivity implements OnItemClickListe
     }
 
     private void initView() {
+        mBtnNew = findViewById(R.id.btn_new);
+        mTvSale = findViewById(R.id.tv_sale);
+        mTvPrice = findViewById(R.id.tv_price);
+        mImgSale = findViewById(R.id.img_sale);
+        mImgPrice = findViewById(R.id.img_price);
+        mDrawableUp = ContextCompat.getDrawable(mContext, R.mipmap.icon_mall_up);
+        mDrawableDown = ContextCompat.getDrawable(mContext, R.mipmap.icon_mall_down);
+        mDrawableNone = ContextCompat.getDrawable(mContext, R.mipmap.icon_mall_none);
+        mColor0 = ContextCompat.getColor(mContext, R.color.gray3);
+        mColor1 = ContextCompat.getColor(mContext, R.color.textColorBlack);
+        mBtnNew.setOnClickListener(this);
+        findViewById(R.id.btn_sale).setOnClickListener(this);
+        findViewById(R.id.btn_price).setOnClickListener(this);
+        findViewById(R.id.btn_search).setOnClickListener(this);
         mEtSearch = findViewById(R.id.et_search);
         mRvPrimaryFilter = findViewById(R.id.rv_primary_filter);
         mRvSecondaryFilter = findViewById(R.id.rv_secondary_filter);
 //        mEmptyView = findViewById(R.id.empty_view);
 
         // 搜索框监听
+        mEtSearch.setOnEditorActionListener(null);
         mEtSearch.addTextChangedListener(new TextWatcher() {
             @Override
             public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
@@ -170,6 +196,7 @@ public class GoodsFilterActivity extends AbsActivity implements OnItemClickListe
             public RefreshAdapter<GoodsSimpleBean> getAdapter() {
                 if (mProductAdapter == null) {
                     mProductAdapter = new EcommerceProductAdapter(mContext);
+                    mProductAdapter.setOnItemClickListener(GoodsFilterActivity.this);
                 }
                 return mProductAdapter;
             }
@@ -365,8 +392,51 @@ public class GoodsFilterActivity extends AbsActivity implements OnItemClickListe
     public void onClick(View v) {
         int id = v.getId();
         if (id == R.id.btn_search) {
-            performSearch();
+            if (!CommonAppConfig.getInstance().isLogin()) {
+                RouteUtil.forwardLogin(mContext);
+                return;
+            }
+            MallSearchActivity.forward(mContext);
+            return;
+        } else if (id == R.id.btn_new) {
+            mSaleSort = SORT_NONE;
+            mPriceSort = SORT_NONE;
+            mIsNew = 1;
+            mImgSale.setImageDrawable(mDrawableNone);
+            mImgPrice.setImageDrawable(mDrawableNone);
+            mBtnNew.setTextColor(mColor1);
+            mTvSale.setTextColor(mColor0);
+            mTvPrice.setTextColor(mColor0);
+        } else if (id == R.id.btn_sale) {
+            if (SORT_NONE.equals(mSaleSort) || SORT_DESC.equals(mSaleSort)) {
+                mSaleSort = SORT_ASC;
+                mImgSale.setImageDrawable(mDrawableUp);
+            } else if (SORT_ASC.equals(mSaleSort)) {
+                mSaleSort = SORT_DESC;
+                mImgSale.setImageDrawable(mDrawableDown);
+            }
+            mPriceSort = SORT_NONE;
+            mIsNew = 0;
+            mImgPrice.setImageDrawable(mDrawableNone);
+            mBtnNew.setTextColor(mColor0);
+            mTvSale.setTextColor(mColor1);
+            mTvPrice.setTextColor(mColor0);
+        } else if (id == R.id.btn_price) {
+            mSaleSort = SORT_NONE;
+            if (SORT_NONE.equals(mPriceSort) || SORT_DESC.equals(mPriceSort)) {
+                mPriceSort = SORT_ASC;
+                mImgPrice.setImageDrawable(mDrawableUp);
+            } else if (SORT_ASC.equals(mPriceSort)) {
+                mPriceSort = SORT_DESC;
+                mImgPrice.setImageDrawable(mDrawableDown);
+            }
+            mIsNew = 0;
+            mImgSale.setImageDrawable(mDrawableNone);
+            mBtnNew.setTextColor(mColor0);
+            mTvSale.setTextColor(mColor0);
+            mTvPrice.setTextColor(mColor1);
         }
+        loadData();
     }
 
     private void performSearch() {

+ 190 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/activity/NewsDetailActivity.java

@@ -0,0 +1,190 @@
+package com.yunbao.main.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.webkit.WebSettings;
+import android.webkit.WebView;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.main.R;
+import com.yunbao.main.bean.NewsBean;
+import com.yunbao.main.http.MainHttpUtil;
+
+public class NewsDetailActivity extends AbsActivity implements View.OnClickListener {
+
+    private TextView mTvNewsTitle;
+    private TextView mTvNewsType;
+    private TextView mTvNewsTime;
+    private WebView mWebViewContent;
+    private ImageView mBtnBack;
+
+    private NewsBean mNewsBean;
+    private NewsBean mNewsDetailBean;
+
+    public static void forward(Context context, NewsBean newsBean) {
+        Intent intent = new Intent(context, NewsDetailActivity.class);
+        intent.putExtra("news_bean", newsBean);
+        context.startActivity(intent);
+    }
+
+    @Override
+    protected boolean isStatusBarWhite() {
+        return false;
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.activity_news_detail;
+    }
+
+    @Override
+    protected void main() {
+        super.main();
+        initView();
+        initData();
+    }
+
+    private void initView() {
+        mTvNewsTitle = findViewById(R.id.tv_news_title);
+        mTvNewsType = findViewById(R.id.tv_news_type);
+        mTvNewsTime = findViewById(R.id.tv_news_time);
+        mWebViewContent = findViewById(R.id.webview_content);
+        mBtnBack = findViewById(R.id.btn_back);
+
+        mBtnBack.setOnClickListener(this);
+
+        // 配置WebView
+        WebSettings webSettings = mWebViewContent.getSettings();
+        webSettings.setJavaScriptEnabled(true);
+        webSettings.setDomStorageEnabled(true);
+        webSettings.setLoadWithOverviewMode(true);
+        webSettings.setUseWideViewPort(true);
+        webSettings.setBuiltInZoomControls(false);
+        webSettings.setDisplayZoomControls(false);
+        webSettings.setSupportZoom(false);
+        webSettings.setDefaultTextEncodingName("utf-8");
+    }
+
+    private void initData() {
+        Intent intent = getIntent();
+        if (intent != null) {
+            mNewsBean = (NewsBean) intent.getSerializableExtra("news_bean");
+            if (mNewsBean != null) {
+                loadNewsDetail(String.valueOf(mNewsBean.getId()));
+            }
+        }
+    }
+
+    // 在NewsDetailActivity中添加方法
+    private void loadNewsDetail(String newsId) {
+        MainHttpUtil.getNewsDetail(newsId, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0 && info.length > 0) {
+                    try {
+                        JSONObject obj = JSON.parseObject(info[0]);
+                        NewsBean newsBean = JSON.toJavaObject(obj, NewsBean.class);
+                        updateUI();
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                }
+            }
+
+            @Override
+            public void onFinish() {
+                // 隐藏加载状态
+            }
+        });
+    }
+
+    private void updateUI() {
+        if (mNewsBean == null) return;
+
+        // 设置标题
+        mTvNewsTitle.setText(mNewsBean.getTitle());
+
+        // 设置时间
+        mTvNewsTime.setText(mNewsBean.getCreate_time());
+
+        // 设置新闻类型和背景
+        mTvNewsType.setText(mNewsBean.getCate_name());
+        setNewsTypeBackground(mNewsBean.getCate_name());
+
+        // 设置内容
+        loadNewsContent(mNewsBean.getContent());
+    }
+
+    private void setNewsTypeBackground(String cateName) {
+        if ("平台公告".equals(cateName)) {
+            mTvNewsType.setBackgroundResource(R.drawable.bg_news_platform_announcement);
+            mTvNewsType.setTextColor(0xFFFF5555);
+        } else if ("运营公告".equals(cateName)) {
+            mTvNewsType.setBackgroundResource(R.drawable.bg_news_operation_announcement);
+            mTvNewsType.setTextColor(0xFF00AA00);
+        } else if ("本地新闻".equals(cateName)) {
+            mTvNewsType.setBackgroundResource(R.drawable.bg_news_local_news);
+            mTvNewsType.setTextColor(0xFF0077FF);
+        } else {
+            mTvNewsType.setBackgroundResource(R.drawable.bg_news_local_news);
+            mTvNewsType.setTextColor(0xFF0077FF);
+        }
+    }
+
+    private void loadNewsContent(String content) {
+        if (content == null || content.isEmpty()) {
+            content = "<p>暂无内容</p>";
+        }
+
+        // 构建完整的HTML内容
+        String htmlContent = buildHtmlContent(content);
+
+        // 加载HTML内容
+        mWebViewContent.loadDataWithBaseURL(null, htmlContent, "text/html", "utf-8", null);
+    }
+
+    private String buildHtmlContent(String content) {
+        StringBuilder html = new StringBuilder();
+        html.append("<!DOCTYPE html>");
+        html.append("<html>");
+        html.append("<head>");
+        html.append("<meta charset='utf-8'>");
+        html.append("<meta name='viewport' content='width=device-width, initial-scale=1.0, user-scalable=no'>");
+        html.append("<style>");
+        html.append("body { margin: 0; padding: 0; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.6; color: #333; }");
+        html.append("img { max-width: 100%; height: auto; display: block; margin: 10px 0; }");
+        html.append("p { margin: 10px 0; }");
+        html.append("h1, h2, h3, h4, h5, h6 { margin: 15px 0 10px 0; }");
+        html.append("div { margin: 5px 0; }");
+        html.append("</style>");
+        html.append("</head>");
+        html.append("<body>");
+        html.append(content);
+        html.append("</body>");
+        html.append("</html>");
+        return html.toString();
+    }
+
+    @Override
+    public void onClick(View v) {
+        int id = v.getId();
+        if (id == R.id.btn_back) {
+            finish();
+        }
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        if (mWebViewContent != null) {
+            mWebViewContent.destroy();
+        }
+    }
+}

+ 3 - 1
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/EcommerceProductAdapter.java

@@ -85,9 +85,11 @@ public class EcommerceProductAdapter extends RefreshAdapter<GoodsSimpleBean> {
         }
 
         void setData(int position, final GoodsSimpleBean bean) {
+            itemView.setTag(bean);
             ImgLoader.display(mContext, bean.getThumb(), ivProductImage);
             tvProductName.setText(bean.getName());
-            tvProductPrice.setText(StringUtil.contact(mMoneySymbol, bean.getPrice()));
+//            tvProductPrice.setText(StringUtil.contact(mMoneySymbol, bean.getPrice()));
+            tvProductPrice.setText(bean.getPrice());
             if (bean.getType() == 1) {
                 tvSalesCount.setText(null);
 //                mOriginPrice.setText(bean.getOriginPrice());

+ 1 - 1
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/EcommerceSecondaryFilterAdapter.java

@@ -63,7 +63,7 @@ public class EcommerceSecondaryFilterAdapter extends RecyclerView.Adapter<Ecomme
 
         int backgroundColor = isSelected ?
                 ContextCompat.getColor(mContext, R.color.white) :
-                ContextCompat.getColor(mContext, R.color.gray1);
+                0xfff9f9f9;
         holder.itemView.setBackgroundColor(backgroundColor);
 
         holder.itemView.setOnClickListener(v -> {

+ 11 - 8
ybvideoandroid/main/src/main/java/com/yunbao/main/adapter/MainHomeNewsAdapter.java

@@ -10,6 +10,7 @@ import android.widget.TextView;
 import androidx.annotation.NonNull;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.yunbao.common.glide.ImgLoader;
 import com.yunbao.main.R;
 import com.yunbao.main.bean.NewsBean;
 
@@ -57,11 +58,11 @@ public class MainHomeNewsAdapter extends RecyclerView.Adapter<MainHomeNewsAdapte
     public void onBindViewHolder(@NonNull MainHomeNewsHolder holder, int position) {
         NewsBean item = newsList.get(position);
 
-        holder.mTitle.setText(item.getTitle());
-        holder.mDate.setText(item.getDate());
+        holder.mTitle.setText("【" + item.getKeywords() + "】" + item.getTitle());
+        holder.mDate.setText(item.getCreate_time());
 
         // 设置标签样式
-        String tag = item.getTag();
+        String tag = item.getCate_name();
         if (tag != null && !tag.isEmpty()) {
             holder.mTag.setVisibility(View.VISIBLE);
             holder.mTag.setText(tag);
@@ -75,13 +76,14 @@ public class MainHomeNewsAdapter extends RecyclerView.Adapter<MainHomeNewsAdapte
                     holder.mTag.setBackgroundResource(R.drawable.bg_news_operation_announcement);
                     holder.mTag.setTextColor(0xFF00AA00);
                     break;
-                case "当地新闻":
+//                case "当地新闻":
+//                    holder.mTag.setBackgroundResource(R.drawable.bg_news_local_news);
+//                    holder.mTag.setTextColor(0xFF0077FF);
+//                    break;
+                default:
                     holder.mTag.setBackgroundResource(R.drawable.bg_news_local_news);
                     holder.mTag.setTextColor(0xFF0077FF);
                     break;
-                default:
-                    holder.mTag.setVisibility(View.GONE);
-                    break;
             }
         } else {
             holder.mTag.setVisibility(View.GONE);
@@ -91,8 +93,9 @@ public class MainHomeNewsAdapter extends RecyclerView.Adapter<MainHomeNewsAdapte
         holder.itemView.setTag(position);
         holder.itemView.setOnClickListener(mOnClickListener);
 
+        ImgLoader.display(mContext, item.getImage(), holder.mNewsImg);
         // 如果需要加载图片,可以解开注释并使用 Glide
-        // Glide.with(mContext).load(item.getImgUrl()).placeholder(R.drawable.placeholder).into(holder.mNewsImg);
+//         Glide.with(mContext).load(item.getImgUrl()).placeholder(R.drawable.placeholder).into(holder.mNewsImg);
     }
 
     @Override

+ 39 - 12
ybvideoandroid/main/src/main/java/com/yunbao/main/bean/NewsBean.java

@@ -1,21 +1,48 @@
 package com.yunbao.main.bean;
 
-public class NewsBean {
+import java.io.Serializable;
+
+public class NewsBean implements Serializable {
+    private int id;
+    private int cate_id;
+    private String keywords;
     private String title;
-    private String tag;
-    private String date;
-    private int imageResId;
+    private String image;
+    private String content;
+    private String create_time;
+    private String cate_name;
+
+    public NewsBean() {
+    }
 
-    public NewsBean(String title, String tag, String date, int imageResId) {
+    public NewsBean(int id, int cate_id, String keywords, String title, String image, String content, String create_time, String cate_name) {
+        this.id = id;
+        this.cate_id = cate_id;
+        this.keywords = keywords;
         this.title = title;
-        this.tag = tag;
-        this.date = date;
-        this.imageResId = imageResId;
+        this.image = image;
+        this.content = content;
+        this.create_time = create_time;
+        this.cate_name = cate_name;
     }
 
     // Getters
+    public int getId() { return id; }
+    public int getCate_id() { return cate_id; }
+    public String getKeywords() { return keywords; }
     public String getTitle() { return title; }
-    public String getTag() { return tag; }
-    public String getDate() { return date; }
-    public int getImageResId() { return imageResId; }
-}
+    public String getImage() { return image; }
+    public String getContent() { return content; }
+    public String getCreate_time() { return create_time; }
+    public String getCate_name() { return cate_name; }
+
+    // Setters
+    public void setId(int id) { this.id = id; }
+    public void setCate_id(int cate_id) { this.cate_id = cate_id; }
+    public void setKeywords(String keywords) { this.keywords = keywords; }
+    public void setTitle(String title) { this.title = title; }
+    public void setImage(String image) { this.image = image; }
+    public void setContent(String content) { this.content = content; }
+    public void setCreate_time(String create_time) { this.create_time = create_time; }
+    public void setCate_name(String cate_name) { this.cate_name = cate_name; }
+}

+ 2 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpConsts.java

@@ -85,4 +85,6 @@ public class MainHttpConsts {
     public static final String GET_AUTHOR_DATA = "getAuthorData";
     public static final String CHECK_AUTHOR_ACTIVE = "checkAuthorActive";
     public static final String GET_AUTHOR_DATA_CENTER_VIDEOS = "getAuthorDataCenterVideos";
+    public static final String GET_NEWS_LIST = "getNewsList";
+    public static final String GET_NEWS_DETAIL = "getNewsDetail";
 }

+ 17 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/http/MainHttpUtil.java

@@ -1141,6 +1141,23 @@ public class MainHttpUtil {
                 .params("add_date", addDate)
                 .execute(callback);
     }
+
+//    获取新闻列表
+    public static void getNewsList(int p, HttpCallback callback) {
+        HttpClient.getInstance().get("Home.getNewsList", MainHttpConsts.GET_NEWS_LIST)
+                .params("uid", CommonAppConfig.getInstance().getUid())
+                .params("token", CommonAppConfig.getInstance().getToken())
+                .params("p", p)
+                .execute(callback);
+    }
+
+    public static void getNewsDetail(String id, HttpCallback callback) {
+        HttpClient.getInstance().get("Home.getNewsDetail", MainHttpConsts.GET_NEWS_DETAIL)
+                .params("uid", CommonAppConfig.getInstance().getUid())
+                .params("token", CommonAppConfig.getInstance().getToken())
+                .params("id", id)
+                .execute(callback);
+    }
 }
 
 

+ 40 - 12
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeNewsViewHolder.java

@@ -9,16 +9,26 @@ import androidx.recyclerview.widget.GridLayoutManager;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
 import com.scwang.smart.refresh.layout.SmartRefreshLayout;
 import com.scwang.smart.refresh.layout.api.RefreshLayout;
 import com.scwang.smart.refresh.layout.listener.OnRefreshListener;
+import com.yunbao.common.bean.VideoBean;
 import com.yunbao.common.custom.CommonRefreshView;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.utils.ToastUtil;
 import com.yunbao.main.R;
+import com.yunbao.main.activity.NewsDetailActivity;
 import com.yunbao.main.adapter.MainHomeNewsAdapter;
 import com.yunbao.main.adapter.MainMessageAdapter;
 import com.yunbao.main.bean.NewsBean;
+import com.yunbao.main.http.MainHttpUtil;
+import com.yunbao.mall.bean.GoodsHomeClassBean;
 
 import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
 /**
  * 首页新闻列表页面
@@ -28,6 +38,7 @@ public class MainHomeNewsViewHolder extends AbsMainViewHolder {
     private SmartRefreshLayout mSmartRefreshLayout;
     private RecyclerView mRecyclerView;
     private MainHomeNewsAdapter mAdapter;
+    private int mPage = 0;
     public MainHomeNewsViewHolder(Context context, ViewGroup parentView) {
         super(context, parentView);
     }
@@ -54,7 +65,7 @@ public class MainHomeNewsViewHolder extends AbsMainViewHolder {
             @Override
             public void onItemClick(NewsBean bean, int position) {
                 // 处理点击事件
-
+                NewsDetailActivity.forward(mContext, bean);
             }
         });
         mRecyclerView.setAdapter(mAdapter);
@@ -62,16 +73,33 @@ public class MainHomeNewsViewHolder extends AbsMainViewHolder {
 
     @Override
     public void loadData() {
-        NewsBean newsBean = new NewsBean("新闻标题", "新闻标签", "2020-02-02", 0);
-        NewsBean newsBean1 = new NewsBean("新闻标题", "新闻标签", "2020-02-02", 0);
-        NewsBean newsBean2 = new NewsBean("新闻标题", "新闻标签", "2020-02-02", 0);
-        ArrayList<NewsBean> newsList = new ArrayList<>();
-        newsList.add(newsBean);
-        newsList.add(newsBean1);
-        newsList.add(newsBean2);
-        mAdapter.setList(newsList);
-        if (mSmartRefreshLayout != null) {
-            mSmartRefreshLayout.finishRefresh();
-        }
+        MainHttpUtil.getNewsList(mPage, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0 && info != null && info.length > 0) {
+                    try {
+                        List<NewsBean> newsList =JSON.parseArray(Arrays.toString(info), NewsBean.class);;
+                        mAdapter.setList(newsList);
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                    }
+                } else {
+                    ToastUtil.show("请求失败,请重试 ");
+                }
+                
+                if (mSmartRefreshLayout != null) {
+                    mSmartRefreshLayout.finishRefresh();
+                }
+            }
+            
+            @Override
+            public void onError() {
+                ToastUtil.show("请求失败,请重试 ");
+                
+                if (mSmartRefreshLayout != null) {
+                    mSmartRefreshLayout.finishRefresh();
+                }
+            }
+        });
     }
 }

+ 14 - 14
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java

@@ -41,7 +41,7 @@ import java.util.List;
 
 public class MainHomeViewHolder extends AbsMainViewHolder {
 
-    private static final int DEFAULT_PAGE_COUNT = 4;
+    private static final int DEFAULT_PAGE_COUNT = 5;
     private ViewPager mViewPager;
     private List<FrameLayout> mViewList;
     private MagicIndicator mIndicator;
@@ -90,7 +90,7 @@ public class MainHomeViewHolder extends AbsMainViewHolder {
 //        云店、朋友、新闻、同城、关注、发现
         mClassBeanList.add(new ClassBean(ClassBean.SHOP_ID, WordUtil.getString(R.string.main_shop)));
         mClassBeanList.add(new ClassBean(ClassBean.FRIEND_ID, WordUtil.getString(R.string.main_friend)));
-//        mClassBeanList.add(new ClassBean(ClassBean.NEWS_ID, WordUtil.getString(R.string.main_news)));
+        mClassBeanList.add(new ClassBean(ClassBean.NEWS_ID, WordUtil.getString(R.string.main_news)));
         mClassBeanList.add(new ClassBean(ClassBean.CITY_ID, WordUtil.getString(R.string.main_city)));
 //        mClassBeanList.add(new ClassBean(ClassBean.RECOMMEND_ID, WordUtil.getString(R.string.recommend)));
 //        mClassBeanList.add(new ClassBean(ClassBean.HOT_ID, WordUtil.getString(R.string.hot)));
@@ -217,7 +217,9 @@ public class MainHomeViewHolder extends AbsMainViewHolder {
             mIndicator.setNavigator(commonNavigator);
             ViewPagerHelper.bind(mIndicator, mViewPager);
         }
-        loadPageData(0);
+//        loadPageData(0);
+        mViewPager.setCurrentItem(3, false);
+        loadPageData(3);
     }
 
     private void loadPageData(int position) {
@@ -232,31 +234,29 @@ public class MainHomeViewHolder extends AbsMainViewHolder {
                 if (parent == null) {
                     return;
                 }
+                if (mRecommendViewHolder == null) {
+                    mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);
+                }
                 if (position == 0) {
                     mMainMallViewHolder = new MainMallViewHolder(mContext, parent);
                     vh = mMainMallViewHolder;
-                    if (mRecommendViewHolder == null) {
-                        mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);
-                    }
 //                    mRecommendViewHolder = new MainHomeRecommendViewHolder(mContext, parent);
 //                    vh = mRecommendViewHolder;
                 } else if (position == 1) {
                     mFriendsViewHolder = new MainHomeFriendsViewHolder(mContext, parent);
                     vh = mFriendsViewHolder;
-                }
+//                }
 //                    mHotViewHolder = new MainHomeHotViewHolder(mContext, parent);
 //                    vh = mHotViewHolder;
-//                } else if (position == 2) {
-//                    mNewsViewHolder = new MainHomeNewsViewHolder(mContext, parent);
-//                    vh = mNewsViewHolder;
-//                    mFollowViewHolder = new MainHomeFollowViewHolder(mContext, parent);
-//                    vh = mFollowViewHolder;}
-                   else if (position == 2) {
+                } else if (position == 2) {
+                    mNewsViewHolder = new MainHomeNewsViewHolder(mContext, parent);
+                    vh = mNewsViewHolder;
+                } else if (position == 3) {
                     mSameCityViewHolder = new MainHomeSameCityViewHolder(mContext, parent);
                     vh = mSameCityViewHolder;
 //                    mMainMallViewHolder = new MainMallViewHolder(mContext, parent);
 //                    vh = mMainMallViewHolder;
-                } else if (position == 3) {
+                } else if (position == 4) {
                     mFollowViewHolder = new MainHomeFollowViewHolder(mContext, parent);
                     vh = mFollowViewHolder;
 //                } else if (position == 4) {

+ 2 - 0
ybvideoandroid/main/src/main/java/com/yunbao/main/views/MainMallViewHolder.java

@@ -263,6 +263,7 @@ public class MainMallViewHolder extends AbsMainViewHolder implements OnItemClick
                 Spanned.SPAN_EXCLUSIVE_EXCLUSIVE
         );
         tvTitle.setText(spannable);
+        headView.findViewById(R.id.btn_product_more).setOnClickListener(this);
 
         mNormalGoodsMenu = headView.findViewById(R.id.btn_normal_goods);
         mAgriculturalAssistanceMenu = headView.findViewById(R.id.btn_agricultural_assistance);
@@ -361,6 +362,7 @@ public class MainMallViewHolder extends AbsMainViewHolder implements OnItemClick
 //        ItemDecoration itemDecoration = new ItemDecoration(mContext, 0x00000000, DpUtil.dp2px(1), 0);
 //        mRecyclerViewRecommend.addItemDecoration(itemDecoration);
         MainMallHotAdapter adapter = new MainMallHotAdapter(mContext, mRecommendList);
+        adapter.setOnItemClickListener(this);
         mRecyclerViewRecommend.setAdapter(adapter);
     }
     @Override

+ 120 - 5
ybvideoandroid/main/src/main/res/layout/activity_filter_goods.xml

@@ -52,6 +52,37 @@
 
         </LinearLayout>
 
+        <LinearLayout
+            android:id="@+id/btn_search"
+            android:layout_width="match_parent"
+            android:layout_height="30dp"
+            android:layout_marginLeft="10dp"
+            android:layout_marginRight="10dp"
+            android:background="@drawable/bg_filter_search"
+            android:orientation="horizontal">
+
+            <ImageView
+                android:layout_width="17dp"
+                android:layout_height="17dp"
+                android:layout_gravity="center_vertical"
+                android:layout_marginLeft="10dp"
+                android:src="@mipmap/icon_main_search"
+                app:tint="#7D7D7D" />
+
+            <TextView
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:gravity="center_vertical"
+                android:hint="@string/mall_387"
+                android:paddingLeft="10dp"
+                android:paddingRight="15dp"
+                android:singleLine="true"
+                android:textColor="@color/textColor"
+                android:textColorHint="#7D7D7D"
+                android:textSize="13sp" />
+        </LinearLayout>
+
+
 
     </LinearLayout>
 
@@ -88,7 +119,8 @@
             android:layout_width="0dp"
             android:layout_height="match_parent"
             android:layout_weight="0.2"
-            android:orientation="vertical">
+            android:orientation="vertical"
+            android:background="#F9F9F9">
 
             <androidx.recyclerview.widget.RecyclerView
                 android:id="@+id/rv_secondary_filter"
@@ -99,17 +131,100 @@
         </LinearLayout>
 
         <!-- 右侧商品列表 -->
-        <FrameLayout
+        <LinearLayout
             android:layout_width="0dp"
             android:layout_height="match_parent"
-            android:layout_weight="0.8">
+            android:layout_weight="0.8"
+            android:orientation="vertical">
+
+            <!-- 商品列表顶部排序布局 -->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="46dp"
+                android:paddingLeft="10dp"
+                android:paddingRight="10dp"
+                android:visibility="visible"
+                android:background="@color/white">
+
+                <TextView
+                    android:id="@+id/btn_new"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:gravity="center"
+                    android:paddingLeft="8dp"
+                    android:paddingRight="8dp"
+                    android:text="@string/mall_389"
+                    android:textColor="@color/gray1"
+                    android:textSize="14sp" />
+
+                <LinearLayout
+                    android:id="@+id/btn_sale"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_marginLeft="25dp"
+                    android:paddingLeft="8dp"
+                    android:paddingRight="8dp"
+                    >
+
+                    <TextView
+                        android:id="@+id/tv_sale"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:text="@string/mall_390"
+                        android:textColor="@color/gray1"
+                        android:textSize="14sp" />
+
+                    <ImageView
+                        android:id="@+id/img_sale"
+                        android:layout_width="8dp"
+                        android:layout_height="14dp"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginLeft="5dp"
+                        android:scaleType="fitXY"
+                        android:src="@mipmap/icon_mall_none" />
+
+                </LinearLayout>
+
+                <LinearLayout
+                    android:id="@+id/btn_price"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:layout_marginLeft="25dp"
+                    android:paddingLeft="8dp"
+                    android:paddingRight="8dp">
+
+                    <TextView
+                        android:id="@+id/tv_price"
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:gravity="center"
+                        android:text="@string/mall_391"
+                        android:textColor="@color/gray1"
+                        android:textSize="14sp" />
+
+                    <ImageView
+                        android:id="@+id/img_price"
+                        android:layout_width="8dp"
+                        android:layout_height="14dp"
+                        android:layout_gravity="center_vertical"
+                        android:layout_marginLeft="5dp"
+                        android:scaleType="fitXY"
+                        android:src="@mipmap/icon_mall_none" />
+
+                </LinearLayout>
+
+            </LinearLayout>
 
             <com.yunbao.common.custom.CommonRefreshView
                 android:id="@+id/refresh_view"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1"
+                app:crv_textColor="@color/textColorBlack"
                 />
-        </FrameLayout>
+
+        </LinearLayout>
 
     </LinearLayout>
 

+ 129 - 0
ybvideoandroid/main/src/main/res/layout/activity_news_detail.xml

@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout 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="match_parent"
+    android:orientation="vertical"
+    android:background="@color/white">
+
+    <!-- 顶部标题栏 -->
+    <FrameLayout
+        android:id="@+id/fl_top"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:background="@color/white"
+        android:paddingTop="19dp">
+
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="46dp">
+
+            <TextView
+                android:id="@+id/titleView"
+                android:layout_width="match_parent"
+                android:layout_height="match_parent"
+                android:layout_centerHorizontal="true"
+                android:gravity="center"
+                android:paddingLeft="20dp"
+                android:paddingRight="20dp"
+                android:text="新闻详情"
+                android:textColor="@color/textColorBlack"
+                android:textSize="18sp"
+                android:textStyle="bold" />
+
+            <ImageView
+                android:id="@+id/btn_back"
+                android:layout_width="40dp"
+                android:layout_height="40dp"
+                android:layout_centerVertical="true"
+                android:onClick="backClick"
+                android:padding="9dp"
+                android:src="@mipmap/icon_back"
+                app:tint="@color/textColorBlack" />
+
+        </RelativeLayout>
+    </FrameLayout>
+
+    <!-- 分割线 -->
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:background="#ffeeeeee" />
+
+    <!-- 内容区域 -->
+    <ScrollView
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:fillViewport="true">
+
+        <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical"
+            android:padding="15dp">
+
+            <!-- 新闻标题 -->
+            <TextView
+                android:id="@+id/tv_news_title"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:textColor="#ff141519"
+                android:textSize="18sp"
+                android:textStyle="bold"
+                android:lineSpacingExtra="4dp"
+                android:text="新闻标题" />
+            <!-- 新闻信息栏 -->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal"
+                android:layout_marginTop="15dp"
+                android:layout_marginBottom="20dp">
+
+                <!-- 新闻类型 -->
+                <TextView
+                    android:id="@+id/tv_news_type"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:paddingTop="3dp"
+                    android:paddingBottom="3dp"
+                    android:paddingLeft="8dp"
+                    android:paddingRight="8dp"
+                    android:text="平台公告"
+                    android:textColor="#ffea3f49"
+                    android:textSize="11sp"
+                    android:background="@drawable/bg_news_platform_announcement" />
+
+                <!-- 发布时间 -->
+                <TextView
+                    android:id="@+id/tv_news_time"
+                    android:layout_width="0dp"
+                    android:layout_height="wrap_content"
+                    android:layout_weight="1"
+                    android:layout_marginLeft="10dp"
+                    android:gravity="end"
+                    android:text="2022-11-01 05:25"
+                    android:textColor="#ff666666"
+                    android:textSize="12sp" />
+
+            </LinearLayout>
+
+            <!-- 分割线 -->
+            <View
+                android:layout_width="match_parent"
+                android:layout_height="1dp"
+                android:background="#ffeeeeee"
+                android:layout_marginBottom="20dp" />
+
+            <!-- 新闻内容 -->
+            <WebView
+                android:id="@+id/webview_content"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginBottom="20dp" />
+
+        </LinearLayout>
+
+    </ScrollView>
+
+</LinearLayout>

+ 75 - 56
ybvideoandroid/main/src/main/res/layout/item_news_list.xml

@@ -3,68 +3,87 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal"
+    android:orientation="vertical"
     android:background="@color/white">
+    
     <LinearLayout
-        android:layout_width="0dp"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:orientation="vertical"
-        android:layout_weight="1">
-        <TextView
-            android:id="@+id/title"
-            android:layout_width="match_parent"
+        android:orientation="horizontal">
+        
+        <LinearLayout
+            android:layout_width="0dp"
             android:layout_height="wrap_content"
-            android:layout_marginTop="15dp"
-            android:layout_marginLeft="10dp"
-            android:layout_marginRight="15dp"
-            android:maxLines="2"
-            android:ellipsize="end"
-            android:lineHeight="20dp"
-            android:textColor="#ff141519"
-            android:textSize="14sp"
-            android:text="【云镜直播最新公告】与当地蔬菜
-示范基地达成合作云镜直播最新公告】与当地蔬菜
-示范基地达成合作"
-            />
-        <RelativeLayout
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal">
+            android:orientation="vertical"
+            android:layout_weight="1">
             <TextView
-                android:id="@+id/news_type"
-                android:layout_width="wrap_content"
-                android:layout_height="17dp"
-                android:layout_marginTop="18dp"
-                android:layout_marginBottom="15dp"
+                android:id="@+id/title"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="15dp"
                 android:layout_marginLeft="10dp"
-                android:paddingRight="8dp"
-                android:paddingLeft="8dp"
-                android:text="平台公告"
-                android:textColor="#ffea3f49"
-                android:textSize="11sp"
-                android:background="@drawable/bg_news_platform_announcement"
-                />
-            <TextView
-                android:id="@+id/time"
-                android:layout_width="wrap_content"
-                android:layout_height="15dp"
-                android:layout_alignParentEnd="true"
-                android:paddingRight="2dp"
-                android:layout_marginTop="20dp"
-                android:text="2022-11-01 05:25"
-                android:textColor="#ff666666"
-                android:textSize="11sp"
+                android:layout_marginRight="15dp"
+                android:maxLines="2"
+                android:ellipsize="end"
+                android:lineHeight="20dp"
+                android:textColor="#ff141519"
+                android:textSize="14sp"
+                android:text="【云镜直播最新公告】与当地蔬菜
+示范基地达成合作云镜直播最新公告】与当地蔬菜
+示范基地达成合作"
                 />
-
-
-        </RelativeLayout>
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
+                <TextView
+                    android:id="@+id/news_type"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="18dp"
+                    android:layout_marginBottom="15dp"
+                    android:layout_marginLeft="10dp"
+                    android:paddingTop="2dp"
+                    android:paddingBottom="2dp"
+                    android:paddingRight="8dp"
+                    android:paddingLeft="8dp"
+                    android:minHeight="17dp"
+                    android:gravity="center"
+                    android:text="平台公告"
+                    android:textColor="#ffea3f49"
+                    android:textSize="11sp"
+                    android:background="@drawable/bg_news_platform_announcement"
+                    />
+                <TextView
+                    android:id="@+id/time"
+                    android:layout_width="wrap_content"
+                    android:layout_height="15dp"
+                    android:layout_alignParentEnd="true"
+                    android:paddingRight="2dp"
+                    android:layout_marginTop="20dp"
+                    android:text="2022-11-01 05:25"
+                    android:textColor="#ff666666"
+                    android:textSize="11sp"
+                    />
+            </RelativeLayout>
+        </LinearLayout>
+        
+        <ImageView
+            android:id="@+id/news_img"
+            android:layout_width="130dp"
+            android:layout_height="75dp"
+            android:layout_marginTop="15dp"
+            android:layout_marginBottom="15dp"
+            android:layout_marginRight="10dp"
+            />
     </LinearLayout>
-<ImageView
-    android:id="@+id/news_img"
-    android:layout_width="130dp"
-    android:layout_height="75dp"
-    android:layout_marginTop="15dp"
-    android:layout_marginBottom="15dp"
-    android:layout_marginRight="10dp"
-    />
+    
+    <!-- 底部分割线 -->
+    <View
+        android:layout_width="match_parent"
+        android:layout_height="1dp"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:background="#D9D9D9" />
+        
 </LinearLayout>

+ 1 - 0
ybvideoandroid/main/src/main/res/values/strings.xml

@@ -0,0 +1 @@
+<resources></resources>

+ 3 - 0
ybvideoandroid/video/build.gradle

@@ -34,4 +34,7 @@ dependencies {
     api project(':beauty')
     //直播
     api project(':live')
+//    implementation 'androidx.appcompat:appcompat:1.6.1'
+//    implementation 'com.google.android.material:material:1.8.0'
+//    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
 }

+ 6 - 2
ybvideoandroid/video/src/main/AndroidManifest.xml

@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.yunbao.video">
 
@@ -5,9 +6,12 @@
         android:allowBackup="true"
         android:theme="@style/AppTheme">
         <activity
+            android:name=".activity.VideoReportDescriptionActivity"
+            android:exported="false" />
+        <activity
             android:name=".activity.VideoPlayActivity"
-            android:screenOrientation="portrait"
             android:configChanges="screenLayout|orientation|screenSize|keyboard|keyboardHidden"
+            android:screenOrientation="portrait"
             android:windowSoftInputMode="adjustNothing|stateAlwaysHidden" />
         <activity
             android:name=".activity.VideoRecordActivity"
@@ -55,4 +59,4 @@
             android:screenOrientation="portrait" />
     </application>
 
-</manifest>
+</manifest>

+ 2 - 2
ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoChooseActivity.java

@@ -32,7 +32,7 @@ import java.util.List;
 
 public class VideoChooseActivity extends AbsActivity implements OnItemClickListener<VideoChooseBean> {
 
-    private long mMaxDuration = 15000;//非会员最大时长
+    private long mMaxDuration = 60000;//非会员最大时长
     private long mMinDuration = 5000;
     private RecyclerView mRecyclerView;
     private View mNoData;
@@ -49,7 +49,7 @@ public class VideoChooseActivity extends AbsActivity implements OnItemClickListe
     protected void main() {
         setTitle(WordUtil.getString(R.string.video_local));
         Intent intent=getIntent();
-        mMaxDuration = intent.getLongExtra(Constants.VIDEO_DURATION_MAX, 15000);
+        mMaxDuration = intent.getLongExtra(Constants.VIDEO_DURATION_MAX, 60000);
         mMinDuration = intent.getLongExtra(Constants.VIDEO_DURATION_MIN, 5000);
         mIsCanSelct = intent.getBooleanExtra(Constants.VIDEO_LOCAL_CAN_SELCT, false);
         mNoData = findViewById(R.id.no_data);

+ 69 - 8
ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoEditActivity.java

@@ -45,6 +45,7 @@ import com.yunbao.video.R;
 import com.yunbao.video.utils.VideoCoverUtil;
 import com.yunbao.video.views.VideoEditFilterViewHolder;
 import com.yunbao.video.views.VideoEditMusicViewHolder;
+import com.yunbao.video.views.VideoLoadingViewHolder;
 import com.yunbao.video.views.VideoMusicViewHolder;
 import com.yunbao.video.views.VideoProcessViewHolder;
 import com.yunbao.video.views.VideoSpecialViewHolder;
@@ -67,6 +68,7 @@ import java.util.List;
 
 public class VideoEditActivity extends AbsActivity implements
         VideoProcessViewHolder.ActionListener,//预处理控件点击取消回调
+        VideoLoadingViewHolder.ActionListener,
         TXVideoEditer.TXVideoProcessListener, //视频编辑前预处理进度回调
         TXVideoEditer.TXThumbnailListener, //视频编辑前预处理中生成每一帧缩略图回调
         TXVideoEditer.TXVideoPreviewListener,//编辑视频预览回调
@@ -123,6 +125,8 @@ public class VideoEditActivity extends AbsActivity implements
     private String mGenerateVideoPathWater;//生成视频的路径
     private VideoProcessViewHolder mVideoProcessViewHolder;//视频预处理进度条
     private VideoProcessViewHolder mVideoGenerateViewHolder;//视频生成进度条
+    private VideoLoadingViewHolder mNewVideoProcessViewHolder;//视频预处理进度条;
+    private VideoLoadingViewHolder mNewVideoGenerateViewHolder;//视频生成进度条
     private int mSaveType;
     private boolean mPaused;//生命周期暂停
     private long mPreviewAtTime;
@@ -394,6 +398,10 @@ public class VideoEditActivity extends AbsActivity implements
         if (mVideoGenerateViewHolder != null) {
             mVideoGenerateViewHolder.setProgress(mGenerateProgress);
         }
+        if (mNewVideoGenerateViewHolder!= null) {
+            mNewVideoGenerateViewHolder.setProgress(mGenerateProgress);
+        }
+
     }
 
 
@@ -405,6 +413,10 @@ public class VideoEditActivity extends AbsActivity implements
         if (mVideoGenerateViewHolder != null) {
             mVideoGenerateViewHolder.setProgress(100);
         }
+        if (mNewVideoGenerateViewHolder != null) {
+            mNewVideoGenerateViewHolder.setProgress(100);
+        }
+
 //        ToastUtil.show(R.string.video_generate_success);
         switch (mSaveType) {
             case Constants.VIDEO_SAVE_SAVE://仅保存
@@ -453,10 +465,14 @@ public class VideoEditActivity extends AbsActivity implements
                 startGenerateVideo();
             }
         } else {
+
             ToastUtil.show(R.string.video_generate_failed);
             if (mVideoGenerateViewHolder != null) {
                 mVideoGenerateViewHolder.removeFromParent();
             }
+            if (mNewVideoGenerateViewHolder != null) {
+                mNewVideoGenerateViewHolder.removeFromParent();
+            }
             if (mBtnNext != null) {
                 mBtnNext.setEnabled(true);
             }
@@ -834,14 +850,24 @@ public class VideoEditActivity extends AbsActivity implements
             mBtnNext.setEnabled(false);
             mVideoEditer.stopPlay();
             mVideoEditer.cancel();
-            mVideoGenerateViewHolder = new VideoProcessViewHolder(mContext, mRoot, WordUtil.getString(R.string.video_process_2));
-            mVideoGenerateViewHolder.setActionListener(new VideoProcessViewHolder.ActionListener() {
+//            mVideoGenerateViewHolder = new VideoProcessViewHolder(mContext, mRoot, WordUtil.getString(R.string.video_process_2));
+//            mVideoGenerateViewHolder.setActionListener(new VideoProcessViewHolder.ActionListener() {
+//                @Override
+//                public void onCancelProcessClick() {
+//                    exit();
+//                }
+//            });
+            mNewVideoGenerateViewHolder = new VideoLoadingViewHolder(mContext, mRoot, "加载中...");
+            mNewVideoGenerateViewHolder.setMaxProgress(100);
+            mNewVideoGenerateViewHolder.show();
+            mNewVideoGenerateViewHolder.setActionListener(new VideoLoadingViewHolder.ActionListener() {
                 @Override
                 public void onCancelProcessClick() {
                     exit();
                 }
             });
-            mVideoGenerateViewHolder.addToParent();
+            mNewVideoGenerateViewHolder.addToParent();
+//            mVideoGenerateViewHolder.addToParent();
             mVideoEditer.setCutFromTime(mCutStartTime, mCutEndTime);
             mGenerateVideoPath = StringUtil.generateVideoOutputPath();
             if (mFromRecord) {
@@ -935,6 +961,12 @@ public class VideoEditActivity extends AbsActivity implements
         if (mVideoGenerateViewHolder != null) {
             mVideoGenerateViewHolder.setActionListener(null);
         }
+        if (mNewVideoProcessViewHolder != null) {
+            mNewVideoProcessViewHolder.setActionListener(null);
+        }
+        if (mNewVideoGenerateViewHolder != null) {
+            mNewVideoGenerateViewHolder.setActionListener(null);
+        }
         if (mBitmapList != null) {
 
             mBitmapList.clear();
@@ -951,6 +983,8 @@ public class VideoEditActivity extends AbsActivity implements
         mSpecialViewHolder = null;
         mVideoProcessViewHolder = null;
         mVideoGenerateViewHolder = null;
+        mNewVideoGenerateViewHolder = null;
+        mNewVideoProcessViewHolder = null;
         mBitmapList = null;
         mBitmapMap = null;
     }
@@ -989,9 +1023,15 @@ public class VideoEditActivity extends AbsActivity implements
      * 开始预处理
      */
     private void startPreProcess() {
-        mVideoProcessViewHolder = new VideoProcessViewHolder(mContext, mRoot, WordUtil.getString(R.string.video_process_1));
-        mVideoProcessViewHolder.addToParent();
-        mVideoProcessViewHolder.setActionListener(this);
+//        mVideoProcessViewHolder = new VideoProcessViewHolder(mContext, mRoot, WordUtil.getString(R.string.video_process_1));
+//        mVideoProcessViewHolder.addToParent();
+//        mVideoProcessViewHolder.setActionListener(this);
+//        增加loading
+        mNewVideoProcessViewHolder = new VideoLoadingViewHolder(mContext, mRoot, "加载中...");
+        mNewVideoProcessViewHolder.addToParent();
+        mNewVideoProcessViewHolder.setMaxProgress(100);
+        mNewVideoProcessViewHolder.show();
+        mNewVideoProcessViewHolder.setActionListener(this);
         if (mHandler == null) {
             mHandler = new MyHandler(this);
         }
@@ -1089,6 +1129,9 @@ public class VideoEditActivity extends AbsActivity implements
             if (mVideoProcessViewHolder != null) {
                 mVideoProcessViewHolder.setProgress(p);
             }
+            if (mNewVideoProcessViewHolder != null) {
+                mNewVideoProcessViewHolder.setProgress(p);
+            }
         }
     }
 
@@ -1099,7 +1142,15 @@ public class VideoEditActivity extends AbsActivity implements
     public void onProcessComplete(TXVideoEditConstants.TXGenerateResult result) {
         L.e(TAG, "视频预处理result------->" + result.descMsg);
         if (result.retCode == TXVideoEditConstants.GENERATE_RESULT_OK) {
-            if (mVideoProcessViewHolder != null && mVideoProcessViewHolder.getProgress() == 0) {
+//            if (mVideoProcessViewHolder != null && mVideoProcessViewHolder.getProgress() == 0) {
+//                if (!mSdkError) {
+//                    mSdkError = true;
+//                    sdkProgressError();
+//                }
+//            } else {
+//                processCompleted();
+//            }
+            if (mNewVideoProcessViewHolder != null && mNewVideoProcessViewHolder.getProgress() == 0) {
                 if (!mSdkError) {
                     mSdkError = true;
                     sdkProgressError();
@@ -1118,6 +1169,9 @@ public class VideoEditActivity extends AbsActivity implements
         if (mVideoProcessViewHolder != null) {
             mVideoProcessViewHolder.setProgress(100);
         }
+        if (mNewVideoProcessViewHolder != null) {
+            mNewVideoProcessViewHolder.setProgress(100);
+        }
         if (mHandler != null) {
             mHandler.postDelayed(new Runnable() {
                 @Override
@@ -1128,6 +1182,11 @@ public class VideoEditActivity extends AbsActivity implements
                         mVideoProcessViewHolder.setActionListener(null);
                     }
                     mVideoProcessViewHolder = null;
+                    if (mNewVideoProcessViewHolder != null) {
+                        mNewVideoProcessViewHolder.removeFromParent();
+                        mNewVideoProcessViewHolder.setActionListener(null);
+                    }
+                    mNewVideoProcessViewHolder = null;
                 }
             }, 500);
         }
@@ -1159,7 +1218,6 @@ public class VideoEditActivity extends AbsActivity implements
         finish();
     }
 
-
     /**
      * 预处理失败
      */
@@ -1180,6 +1238,9 @@ public class VideoEditActivity extends AbsActivity implements
             if (mVideoProcessViewHolder != null) {
                 mVideoProcessViewHolder.setProgress(p);
             }
+            if (mNewVideoProcessViewHolder!= null) {
+                mNewVideoProcessViewHolder.setProgress(p);
+            }
         }
         if (p >= 100) {
             processCompleted();

+ 5 - 0
ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoPublishActivity.java

@@ -152,6 +152,11 @@ public class VideoPublishActivity extends AbsActivity implements View.OnClickLis
     private int mIsShop;
 
     @Override
+    protected boolean isStatusBarWhite() {
+        return false;
+    }
+
+    @Override
     protected int getLayoutId() {
         return R.layout.activity_video_publish;
     }

+ 2 - 2
ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoRecordActivity.java

@@ -112,8 +112,8 @@ public class VideoRecordActivity extends AbsActivity implements
 
     private static final String TAG = "VideoRecordActivity";
     private static final int MIN_DURATION = 5000;//最小录制时间5s
-    private static final int MAX_DURATION = 30000;//最大录制时间15s
-    private static final int MAX_DURATION_VIP = 60000;//vip最大录制时间60s
+    private static final int MAX_DURATION = 60000;//最大录制时间15s
+    private static final int MAX_DURATION_VIP = 90000;//vip最大录制时间60s
     private final int MSG_LOAD_VIDEO_INFO = 1000;
 
     //按钮动画相关

+ 35 - 1
ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoReportActivity.java

@@ -2,6 +2,8 @@ package com.yunbao.video.activity;
 
 import android.content.Context;
 import android.content.Intent;
+
+import androidx.recyclerview.widget.GridLayoutManager;
 import androidx.recyclerview.widget.LinearLayoutManager;
 import androidx.recyclerview.widget.RecyclerView;
 import android.text.TextUtils;
@@ -11,6 +13,7 @@ import android.widget.EditText;
 import com.alibaba.fastjson.JSON;
 import com.yunbao.common.Constants;
 import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.custom.ItemDecoration;
 import com.yunbao.common.http.HttpCallback;
 import com.yunbao.common.interfaces.KeyBoardHeightChangeListener;
 import com.yunbao.common.utils.KeyBoardHeightUtil;
@@ -44,6 +47,7 @@ public class VideoReportActivity extends AbsActivity implements VideoReportAdapt
     private VideoReportAdapter mAdapter;
     //    private KeyBoardHeightUtil mKeyBoardHeightUtil;
     private InputMethodManager imm;
+    private VideoReportBean currentSelectedBean;
 
     @Override
     protected int getLayoutId() {
@@ -57,7 +61,12 @@ public class VideoReportActivity extends AbsActivity implements VideoReportAdapt
         mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID);
         mRecyclerView = findViewById(R.id.recyclerView);
         mRecyclerView.setHasFixedSize(true);
-        mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
+        // 添加分割线
+        ItemDecoration decoration = new ItemDecoration(mContext, 0x00000000, 10, 17);
+        decoration.setOnlySetItemOffsetsButNoDraw(true);
+        mRecyclerView.addItemDecoration(decoration);
+        // 修改为GridLayoutManager,2列布局
+        mRecyclerView.setLayoutManager(new GridLayoutManager(mContext, 2));
         VideoHttpUtil.getVideoReportList(new HttpCallback() {
             @Override
             public void onSuccess(int code, String msg, String[] info) {
@@ -74,6 +83,21 @@ public class VideoReportActivity extends AbsActivity implements VideoReportAdapt
                 }
             }
         });
+        findViewById(R.id.btn_submit).setOnClickListener(v -> {
+            if (TextUtils.isEmpty(mVideoId)) {
+                return;
+            }
+            if (currentSelectedBean == null) {
+                ToastUtil.show(R.string.video_report_tip_3);
+                return;
+            }
+            String content = currentSelectedBean.getName();
+//            if (currentSelectedBean.getId() == -1 && !TextUtils.isEmpty(text)) {
+//                content = StringUtil.contact(content, " ", text);
+//            }
+            VideoHttpUtil.videoReport(mVideoId, currentSelectedBean.getId(), content, mReportCallback);
+
+        });
     }
 
     @Override
@@ -93,6 +117,16 @@ public class VideoReportActivity extends AbsActivity implements VideoReportAdapt
     }
 
     @Override
+    public void onSelectionChanged(VideoReportBean selectedBean) {
+        currentSelectedBean = selectedBean;
+        // 检查是否选择了"其他"类型
+        if ("其他".equals(currentSelectedBean.getName()) || currentSelectedBean.getId() == -1) {
+            // 跳转到举报描述界面
+            VideoReportDescriptionActivity.forward(mContext, mVideoId, currentSelectedBean);
+        }
+    }
+
+    @Override
     public void onEditShow(EditText editText, boolean isShow) {
         if (isShow) {
             //软键盘弹出

+ 97 - 0
ybvideoandroid/video/src/main/java/com/yunbao/video/activity/VideoReportDescriptionActivity.java

@@ -0,0 +1,97 @@
+package com.yunbao.video.activity;
+
+import android.content.Context;
+import android.content.Intent;
+import android.text.TextUtils;
+import android.widget.Button;
+import android.widget.EditText;
+
+import com.yunbao.common.Constants;
+import com.yunbao.common.activity.AbsActivity;
+import com.yunbao.common.http.HttpCallback;
+import com.yunbao.common.utils.ToastUtil;
+import com.yunbao.common.utils.WordUtil;
+import com.yunbao.video.R;
+import com.yunbao.video.bean.VideoReportBean;
+import com.yunbao.video.http.VideoHttpUtil;
+
+/**
+ * 视频举报描述页面
+ */
+public class VideoReportDescriptionActivity extends AbsActivity {
+
+    public static void forward(Context context, String videoId, VideoReportBean reportBean) {
+        Intent intent = new Intent(context, VideoReportDescriptionActivity.class);
+        intent.putExtra(Constants.VIDEO_ID, videoId);
+        intent.putExtra("report_bean", reportBean); // 传递举报类型信息
+        context.startActivity(intent);
+    }
+
+    private String mVideoId;
+    private int mReportType;
+    private String mReportTypeName;
+    private EditText mEtDescription;
+    private Button mBtnSubmit;
+    private VideoReportBean reportBean;
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.activity_video_report_description;
+    }
+
+    @Override
+    protected void main() {
+        setTitle("举报");
+
+        mVideoId = getIntent().getStringExtra(Constants.VIDEO_ID);
+        mReportType = getIntent().getIntExtra("report_type", 0);
+        mReportTypeName = getIntent().getStringExtra("report_type_name");
+        reportBean = (VideoReportBean) getIntent().getSerializableExtra("report_bean");
+        initView();
+        initListener();
+    }
+
+    private void initView() {
+        mEtDescription = findViewById(R.id.et_description);
+        mBtnSubmit = findViewById(R.id.btn_submit);
+    }
+
+    private void initListener() {
+        mBtnSubmit.setOnClickListener(v -> submitReport());
+    }
+
+    private void submitReport() {
+        String description = mEtDescription.getText().toString().trim();
+
+        if (TextUtils.isEmpty(description)) {
+            ToastUtil.show("请输入举报描述");
+            return;
+        }
+
+        if (description.length() < 10) {
+            ToastUtil.show("举报描述至少需要10个字符");
+            return;
+        }
+
+        // 组合举报内容:举报类型 + 用户描述
+        String reportContent = mReportTypeName + ": " + description;
+
+        VideoHttpUtil.videoReport(mVideoId, mReportType, reportContent, new HttpCallback() {
+            @Override
+            public void onSuccess(int code, String msg, String[] info) {
+                if (code == 0) {
+                    ToastUtil.show("举报提交成功");
+                    finish();
+                } else {
+                    ToastUtil.show(msg);
+                }
+            }
+        });
+    }
+
+    @Override
+    protected void onDestroy() {
+        super.onDestroy();
+        VideoHttpUtil.cancel("VIDEO_REPORT");
+    }
+}

+ 116 - 100
ybvideoandroid/video/src/main/java/com/yunbao/video/adapter/VideoReportAdapter.java

@@ -14,6 +14,7 @@ import android.widget.TextView;
 
 import com.yunbao.common.Constants;
 import com.yunbao.video.R;
+import com.yunbao.video.activity.VideoReportDescriptionActivity;
 import com.yunbao.video.bean.VideoReportBean;
 
 import java.util.List;
@@ -24,10 +25,10 @@ import java.util.List;
 
 public class VideoReportAdapter extends RecyclerView.Adapter {
 
-    private static final int HEAD = -1;
-    private static final int FOOT = -2;
-    private static final int NORMAL = 0;
-    private static final int NORMAL_LAST = 1;
+//    private static final int HEAD = -1;
+//    private static final int FOOT = -2;
+//    private static final int NORMAL = 0;
+//    private static final int NORMAL_LAST = 1;
 
     private List<VideoReportBean> mList;
     private LayoutInflater mInflater;
@@ -35,7 +36,7 @@ public class VideoReportAdapter extends RecyclerView.Adapter {
     private int mCheckedPosition;
     private View.OnClickListener mOnClickListener;
     private View.OnClickListener mReportListener;
-    private FootVh mFootVh;
+//    private FootVh mFootVh;
     private ActionListener mActionListener;
     private VideoReportBean mCurVideoReportBean;
 
@@ -43,7 +44,7 @@ public class VideoReportAdapter extends RecyclerView.Adapter {
         mList = list;
         mInflater = LayoutInflater.from(context);
         mCheckedDrawable = ContextCompat.getDrawable(context, R.mipmap.icon_video_checked);
-        mCheckedPosition = 1;
+        mCheckedPosition = 0;
         mCurVideoReportBean = mList.get(0);
         mOnClickListener = new View.OnClickListener() {
             @Override
@@ -73,65 +74,70 @@ public class VideoReportAdapter extends RecyclerView.Adapter {
                     return;
                 }
                 if (mCheckedPosition >= 0) {
-                    mList.get(mCheckedPosition - 1).setChecked(false);
+                    mList.get(mCheckedPosition).setChecked(false);
                     notifyItemChanged(mCheckedPosition, Constants.PAYLOAD);
                 }
-                VideoReportBean bean = mList.get(position - 1);
+                VideoReportBean bean = mList.get(position);
                 bean.setChecked(true);
                 notifyItemChanged(position, Constants.PAYLOAD);
                 mCheckedPosition = position;
                 mCurVideoReportBean = bean;
-                if (bean.getId() == -1) {
-                    if (mFootVh != null) {
-                        mFootVh.showEdit(true);
-                    }
-                } else {
-                    if (mFootVh != null) {
-                        mFootVh.showEdit(false);
-                    }
-                }
-            }
-        };
-        mReportListener = new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                if (mFootVh != null) {
-                    mFootVh.submit();
+                if (mActionListener != null) {
+                    mActionListener.onSelectionChanged(bean);
                 }
+//                if (bean.getId() == -1) {
+//                    if (mFootVh != null) {
+//                        mFootVh.showEdit(true);
+//                    }
+//                } else {
+//                    if (mFootVh != null) {
+//                        mFootVh.showEdit(false);
+//                    }
+//                }
             }
         };
+//        mReportListener = new View.OnClickListener() {
+//            @Override
+//            public void onClick(View v) {
+//                if (mFootVh != null) {
+//                    mFootVh.submit();
+//                }
+//            }
+//        };
     }
 
-    @Override
-    public int getItemViewType(int position) {
-        if (position == 0) {
-            return HEAD;
-        } else if (position == mList.size() + 1) {
-            return FOOT;
-        } else {
-            if (position == mList.size()) {
-                return NORMAL_LAST;
-            }
-            return NORMAL;
-        }
-    }
+//    @Override
+//    public int getItemViewType(int position) {
+//        if (position == 0) {
+//            return HEAD;
+//        } else if (position == mList.size() + 1) {
+//            return FOOT;
+//        } else {
+//            if (position == mList.size()) {
+//                return NORMAL_LAST;
+//            }
+//            return NORMAL;
+//        }
+//    }
 
     @NonNull
     @Override
     public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
-        if (viewType == HEAD) {
-            return new HeadVh(mInflater.inflate(R.layout.item_video_report_head, parent, false));
-        } else if (viewType == FOOT) {
-            if (mFootVh == null) {
-                mFootVh = new FootVh(mInflater.inflate(R.layout.item_video_report_foot, parent, false));
-            }
-            return mFootVh;
-        } else {
-            if (viewType == NORMAL_LAST) {
-                return new Vh(mInflater.inflate(R.layout.item_video_report_2, parent, false));
-            }
-            return new Vh(mInflater.inflate(R.layout.item_video_report, parent, false));
-        }
+//        if (viewType == HEAD) {
+//            return new HeadVh(mInflater.inflate(R.layout.item_video_report_head, parent, false));
+//        } else if (viewType == FOOT) {
+//            if (mFootVh == null) {
+//                mFootVh = new FootVh(mInflater.inflate(R.layout.item_video_report_foot, parent, false));
+//            }
+//            return mFootVh;
+//        } else {
+//            if (viewType == NORMAL_LAST) {
+//                return new Vh(mInflater.inflate(R.layout.item_video_report_2, parent, false));
+//            }
+//            return new Vh(mInflater.inflate(R.layout.item_video_report, parent, false));
+
+//        }
+        return new Vh(mInflater.inflate(R.layout.item_video_report_new, parent, false));
     }
 
     @Override
@@ -143,70 +149,73 @@ public class VideoReportAdapter extends RecyclerView.Adapter {
     public void onBindViewHolder(@NonNull RecyclerView.ViewHolder vh, int position, @NonNull List payloads) {
         Object payload = payloads.size() > 0 ? payloads.get(0) : null;
         if (vh instanceof Vh) {
-            ((Vh) vh).setData(mList.get(position - 1), position, payload);
+            // 修复:直接使用position,不再减1
+            ((Vh) vh).setData(mList.get(position), position, payload);
         }
     }
 
     @Override
     public int getItemCount() {
-        return mList.size() + 2;
-    }
-
-    class HeadVh extends RecyclerView.ViewHolder {
-
-        public HeadVh(View itemView) {
-            super(itemView);
-        }
+        // 修复:直接返回mList的大小,不再加2
+        return mList.size();
     }
 
-    class FootVh extends RecyclerView.ViewHolder {
-
-        EditText mEditText;
-
-        public FootVh(View itemView) {
-            super(itemView);
-            mEditText = itemView.findViewById(R.id.edit);
-            itemView.findViewById(R.id.btn_report).setOnClickListener(mReportListener);
-        }
-
-        void submit() {
-            String text = mEditText.getText().toString().trim();
-            if (mActionListener != null) {
-                mActionListener.onReportClick(mCurVideoReportBean, text);
-            }
-        }
-
-        void showEdit(boolean show) {
-            if (mEditText != null) {
-                if (show) {
-                    if (mEditText.getVisibility() != View.VISIBLE) {
-                        mEditText.setVisibility(View.VISIBLE);
-                    }
-                    if (mActionListener != null) {
-                        mActionListener.onEditShow(mEditText, show);
-                    }
-                } else {
-                    if (mActionListener != null) {
-                        mActionListener.onEditShow(mEditText, show);
-                    }
-                    if (mEditText.getVisibility() == View.VISIBLE) {
-                        mEditText.setVisibility(View.GONE);
-                    }
-                }
-            }
-        }
-
-    }
+//    class HeadVh extends RecyclerView.ViewHolder {
+//
+//        public HeadVh(View itemView) {
+//            super(itemView);
+//        }
+//    }
+
+//    class FootVh extends RecyclerView.ViewHolder {
+//
+//        EditText mEditText;
+//
+//        public FootVh(View itemView) {
+//            super(itemView);
+//            mEditText = itemView.findViewById(R.id.edit);
+//            itemView.findViewById(R.id.btn_report).setOnClickListener(mReportListener);
+//        }
+//
+//        void submit() {
+//            String text = mEditText.getText().toString().trim();
+//            if (mActionListener != null) {
+//                mActionListener.onReportClick(mCurVideoReportBean, text);
+//            }
+//        }
+//
+//        void showEdit(boolean show) {
+//            if (mEditText != null) {
+//                if (show) {
+//                    if (mEditText.getVisibility() != View.VISIBLE) {
+//                        mEditText.setVisibility(View.VISIBLE);
+//                    }
+//                    if (mActionListener != null) {
+//                        mActionListener.onEditShow(mEditText, show);
+//                    }
+//                } else {
+//                    if (mActionListener != null) {
+//                        mActionListener.onEditShow(mEditText, show);
+//                    }
+//                    if (mEditText.getVisibility() == View.VISIBLE) {
+//                        mEditText.setVisibility(View.GONE);
+//                    }
+//                }
+//            }
+//        }
+//
+//    }
 
     class Vh extends RecyclerView.ViewHolder {
 
-        ImageView mImg;
         TextView mText;
+        TextView mSelectBtn;
+
 
         public Vh(View itemView) {
             super(itemView);
-            mImg = itemView.findViewById(R.id.img);
             mText = itemView.findViewById(R.id.text);
+            mSelectBtn = itemView.findViewById(R.id.bt_select);
             itemView.setOnClickListener(mOnClickListener);
         }
 
@@ -215,7 +224,12 @@ public class VideoReportAdapter extends RecyclerView.Adapter {
                 itemView.setTag(position);
                 mText.setText(bean.getName());
             }
-            mImg.setImageDrawable(bean.isChecked() ? mCheckedDrawable : null);
+            itemView.setSelected(bean.isChecked());
+            mSelectBtn.setSelected(bean.isChecked());
+            // 根据选中状态改变文字颜色
+            mText.setTextColor(bean.isChecked() ?
+                    0xff00B760 : 0xff000000);
+            mSelectBtn.setVisibility(bean.isChecked() ? View.VISIBLE : View.GONE);
         }
     }
 
@@ -223,6 +237,8 @@ public class VideoReportAdapter extends RecyclerView.Adapter {
         void onReportClick(VideoReportBean bean, String text);
 
         void onEditShow(EditText editText, boolean isShow);
+
+        void onSelectionChanged(VideoReportBean selectedBean);
     }
 
     public void setActionListener(ActionListener actionListener) {

+ 3 - 1
ybvideoandroid/video/src/main/java/com/yunbao/video/bean/VideoReportBean.java

@@ -1,10 +1,12 @@
 package com.yunbao.video.bean;
 
+import java.io.Serializable;
+
 /**
  * Created by cxf on 2018/12/15.
  */
 
-public class VideoReportBean {
+public class VideoReportBean implements Serializable {
 
     private int id;
     private String name;

+ 219 - 0
ybvideoandroid/video/src/main/java/com/yunbao/video/views/AnimatedCircleProgress.java

@@ -0,0 +1,219 @@
+package com.yunbao.video.views;
+
+import android.animation.ValueAnimator;
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.graphics.Canvas;
+import android.graphics.Paint;
+import android.graphics.RectF;
+import androidx.annotation.Nullable;
+import android.util.AttributeSet;
+import android.view.View;
+import android.view.animation.DecelerateInterpolator;
+
+import com.yunbao.common.R;
+
+/**
+ * 带动画效果的圆形进度条
+ */
+public class AnimatedCircleProgress extends View {
+
+    private float mStrokeWidth;
+    private float mR;
+    private int mBgColor;
+    private int mFgColor;
+    private float mMaxProgress;
+    private float mCurProgress;
+    private float mAnimatedProgress; // 动画中的进度值
+    private Paint mBgPaint;
+    private Paint mFgPaint;
+    private float mX;
+    private RectF mRectF;
+    private ValueAnimator mProgressAnimator;
+    private long mAnimationDuration = 800; // 动画时长
+
+    public AnimatedCircleProgress(Context context) {
+        this(context, null);
+    }
+
+    public AnimatedCircleProgress(Context context, @Nullable AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public AnimatedCircleProgress(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
+        super(context, attrs, defStyleAttr);
+        TypedArray ta = context.obtainStyledAttributes(attrs, R.styleable.CircleProgress);
+        mBgColor = ta.getColor(R.styleable.CircleProgress_cp_bg_color, 0xFFE0E0E0);
+        mFgColor = ta.getColor(R.styleable.CircleProgress_cp_fg_color, 0xFF4CAF50);
+        mStrokeWidth = ta.getDimension(R.styleable.CircleProgress_cp_stroke_width, 8f);
+        mMaxProgress = ta.getFloat(R.styleable.CircleProgress_cp_max_progress, 100f);
+        mCurProgress = ta.getFloat(R.styleable.CircleProgress_cp_cur_progress, 0f);
+        // 修复:初始化mAnimatedProgress
+        mAnimatedProgress = mCurProgress;
+        ta.recycle();
+        initPaint();
+    }
+
+    private void initPaint() {
+        mBgPaint = new Paint();
+        mBgPaint.setAntiAlias(true);
+        mBgPaint.setDither(true);
+        mBgPaint.setColor(mBgColor);
+        mBgPaint.setStyle(Paint.Style.STROKE);
+        mBgPaint.setStrokeWidth(mStrokeWidth);
+        mBgPaint.setStrokeCap(Paint.Cap.ROUND); // 圆角端点
+
+        mFgPaint = new Paint();
+        mFgPaint.setAntiAlias(true);
+        mFgPaint.setDither(true);
+        mFgPaint.setColor(mFgColor);
+        mFgPaint.setStyle(Paint.Style.STROKE);
+        mFgPaint.setStrokeWidth(mStrokeWidth);
+        mFgPaint.setStrokeCap(Paint.Cap.ROUND); // 圆角端点
+        mRectF = new RectF();
+    }
+
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        int widthSize = MeasureSpec.getSize(widthMeasureSpec);
+        super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY));
+    }
+
+    @Override
+    protected void onSizeChanged(int w, int h, int oldw, int oldh) {
+        float offset = mStrokeWidth / 2;
+        mX = w / 2f;
+        mR = mX - offset;
+        mRectF = new RectF();
+        mRectF.left = offset;
+        mRectF.top = offset;
+        mRectF.right = w - offset;
+        mRectF.bottom = mRectF.right;
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        // 绘制背景圆环
+        canvas.drawCircle(mX, mX, mR, mBgPaint);
+
+        // 绘制进度弧线
+        if (mMaxProgress > 0 && mAnimatedProgress >= 0) {
+            float sweepAngle = mAnimatedProgress / mMaxProgress * 360;
+            if (sweepAngle > 0) {
+                canvas.drawArc(mRectF, -90, sweepAngle, false, mFgPaint);
+            }
+        }
+    }
+
+    /**
+     * 设置最大进度
+     */
+    public void setMaxProgress(float maxProgress) {
+        mMaxProgress = maxProgress;
+        invalidate();
+    }
+
+    /**
+     * 获取当前进度
+     */
+    public float getCurProgress() {
+        return mCurProgress;
+    }
+
+    /**
+     * 设置当前进度(带动画)
+     */
+    public void setCurProgress(float curProgress) {
+        setCurProgress(curProgress, true);
+    }
+
+    /**
+     * 设置当前进度
+     * @param curProgress 目标进度
+     * @param animated 是否使用动画
+     */
+    public void setCurProgress(float curProgress, boolean animated) {
+        if (curProgress < 0) curProgress = 0;
+        if (curProgress > mMaxProgress) curProgress = mMaxProgress;
+
+        float oldProgress = mCurProgress;
+        mCurProgress = curProgress;
+
+        if (animated && oldProgress != curProgress) {
+            startProgressAnimation(oldProgress, curProgress);
+        } else {
+            mAnimatedProgress = curProgress;
+            invalidate();
+        }
+    }
+
+    /**
+     * 启动进度动画
+     */
+    private void startProgressAnimation(float fromProgress, float toProgress) {
+        if (mProgressAnimator != null && mProgressAnimator.isRunning()) {
+            mProgressAnimator.cancel();
+        }
+
+        mProgressAnimator = ValueAnimator.ofFloat(fromProgress, toProgress);
+        mProgressAnimator.setDuration(mAnimationDuration);
+        mProgressAnimator.setInterpolator(new DecelerateInterpolator());
+        mProgressAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
+            @Override
+            public void onAnimationUpdate(ValueAnimator animation) {
+                mAnimatedProgress = (Float) animation.getAnimatedValue();
+                invalidate();
+            }
+        });
+        mProgressAnimator.start();
+    }
+
+    /**
+     * 设置动画时长
+     */
+    public void setAnimationDuration(long duration) {
+        mAnimationDuration = duration;
+    }
+
+    /**
+     * 设置背景色
+     */
+    public void setBgColor(int bgColor) {
+        mBgColor = bgColor;
+        if (mBgPaint != null) {
+            mBgPaint.setColor(bgColor);
+            invalidate();
+        }
+    }
+
+    /**
+     * 设置前景色
+     */
+    public void setFgColor(int fgColor) {
+        mFgColor = fgColor;
+        if (mFgPaint != null) {
+            mFgPaint.setColor(fgColor);
+            invalidate();
+        }
+    }
+
+    /**
+     * 设置描边宽度
+     */
+    public void setStrokeWidth(float strokeWidth) {
+        mStrokeWidth = strokeWidth;
+        if (mBgPaint != null && mFgPaint != null) {
+            mBgPaint.setStrokeWidth(strokeWidth);
+            mFgPaint.setStrokeWidth(strokeWidth);
+            requestLayout();
+        }
+    }
+
+    @Override
+    protected void onDetachedFromWindow() {
+        super.onDetachedFromWindow();
+        if (mProgressAnimator != null && mProgressAnimator.isRunning()) {
+            mProgressAnimator.cancel();
+        }
+    }
+}

+ 157 - 0
ybvideoandroid/video/src/main/java/com/yunbao/video/views/VideoLoadingViewHolder.java

@@ -0,0 +1,157 @@
+package com.yunbao.video.views;
+
+import android.content.Context;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import com.yunbao.common.views.AbsViewHolder;
+import com.yunbao.video.R;
+
+/**
+ * 加载界面ViewHolder
+ * 左上角圆形进度条,中间显示加载文本
+ */
+public class VideoLoadingViewHolder extends AbsViewHolder implements View.OnClickListener {
+
+    private VideoLoadingViewHolder.ActionListener mActionListener;
+    private TextView mLoadingText;
+    private AnimatedCircleProgress mCircleProgress;
+    private String mLoadingMessage;
+    private float mProgress;
+    private float mMaxProgress = 100;
+
+    public VideoLoadingViewHolder(Context context, ViewGroup parentView) {
+        super(context, parentView);
+    }
+
+    public VideoLoadingViewHolder(Context context, ViewGroup parentView, String loadingMessage) {
+        super(context, parentView, loadingMessage);
+    }
+
+    @Override
+    protected void processArguments(Object... args) {
+        if (args != null && args.length > 0) {
+            mLoadingMessage = (String) args[0];
+        }
+        if (mLoadingMessage == null) {
+            mLoadingMessage = "加载中...";
+        }
+    }
+
+    @Override
+    protected int getLayoutId() {
+        return R.layout.view_video_loading;
+    }
+
+    @Override
+    public void init() {
+        mLoadingText = findViewById(R.id.loading_text);
+        mCircleProgress = findViewById(R.id.circle_progress);
+        findViewById(R.id.btn_cancel).setOnClickListener(this);
+
+        mLoadingText.setText(mLoadingMessage);
+        mCircleProgress.setMaxProgress(mMaxProgress);
+//        mCircleProgress.setBgColor(0xFFFFFFFF);
+//        mCircleProgress.setBgColor(0xFF04CB64);
+        mCircleProgress.setAnimationDuration(500); // 设置动画时长为500ms
+        mCircleProgress.setCurProgress(0, false); // 初始化时不使用动画
+    }
+
+    public void onClick(View v) {
+        int i = v.getId();
+        if (i == R.id.btn_cancel) {
+            if (mActionListener != null) {
+                mActionListener.onCancelProcessClick();
+            }
+        }
+    }
+
+    /**
+     * 设置进度(带动画效果)
+     * @param progress 当前进度 (0-100)
+     */
+    public void setProgress(float progress) {
+        if (mProgress != progress) {
+            mProgress = progress;
+            if (mCircleProgress != null) {
+                mCircleProgress.setCurProgress(progress, true); // 使用动画
+            }
+        }
+    }
+
+    /**
+     * 设置进度(不带动画)
+     * @param progress 当前进度 (0-100)
+     */
+    public void setProgressWithoutAnimation(float progress) {
+        if (mProgress != progress) {
+            mProgress = progress;
+            if (mCircleProgress != null) {
+                mCircleProgress.setCurProgress(progress, false); // 不使用动画
+            }
+        }
+    }
+
+    /**
+     * 获取当前进度
+     */
+    public float getProgress() {
+        return mProgress;
+    }
+
+    /**
+     * 设置最大进度值
+     */
+    public void setMaxProgress(float maxProgress) {
+        mMaxProgress = maxProgress;
+        if (mCircleProgress != null) {
+            mCircleProgress.setMaxProgress(maxProgress);
+        }
+    }
+
+    /**
+     * 设置加载文本
+     */
+    public void setLoadingText(String text) {
+        mLoadingMessage = text;
+        if (mLoadingText != null) {
+            mLoadingText.setText(text);
+        }
+    }
+
+    /**
+     * 设置动画时长
+     */
+    public void setAnimationDuration(long duration) {
+        if (mCircleProgress != null) {
+            mCircleProgress.setAnimationDuration(duration);
+        }
+    }
+
+    /**
+     * 显示加载界面
+     */
+    public void show() {
+        if (mContentView != null) {
+            mContentView.setVisibility(View.VISIBLE);
+        }
+    }
+
+    /**
+     * 隐藏加载界面
+     */
+    public void hide() {
+        if (mContentView != null) {
+            mContentView.setVisibility(View.GONE);
+        }
+    }
+
+    public interface ActionListener {
+        void onCancelProcessClick();
+    }
+
+    public void setActionListener(VideoLoadingViewHolder.ActionListener actionListener) {
+        mActionListener = actionListener;
+    }
+}

+ 9 - 0
ybvideoandroid/video/src/main/res/drawable/bg_edit_text.xml

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

+ 5 - 0
ybvideoandroid/video/src/main/res/drawable/bg_submit.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">
+    <solid android:color="#00B760" />
+    <corners android:radius="25dp" />
+</shape>

+ 3 - 2
ybvideoandroid/video/src/main/res/drawable/bg_video_pub.xml

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

+ 16 - 0
ybvideoandroid/video/src/main/res/drawable/bg_video_report_item_selector.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_selected="true">
+        <shape android:shape="rectangle">
+            <solid android:color="#D5FFEB" />
+            <stroke android:width="1dp" android:color="#00B760" />
+            <corners android:radius="5dp" />
+        </shape>
+    </item>
+    <item>
+        <shape android:shape="rectangle">
+            <solid android:color="@color/white" />
+            <corners android:radius="5dp" />
+        </shape>
+    </item>
+</selector>

+ 17 - 0
ybvideoandroid/video/src/main/res/drawable/bg_video_report_select.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:state_selected="true">
+        <shape>
+            <solid android:color="#00B760" />
+<!--            左上右下圆角为5-->
+            <corners android:topLeftRadius="5dp" android:bottomRightRadius="5dp" />
+        </shape>
+    </item>
+    <item android:state_selected="false">
+        <shape>
+            <solid android:color="@color/white" />
+            <!--            左上右下圆角为5-->
+            <corners android:topLeftRadius="5dp" android:bottomRightRadius="5dp" />
+        </shape>
+    </item>
+</selector>

+ 2 - 1
ybvideoandroid/video/src/main/res/layout/activity_video_publish.xml

@@ -4,7 +4,8 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:focusable="true"
-    android:focusableInTouchMode="true">
+    android:focusableInTouchMode="true"
+    android:background="@color/white">
 
     <LinearLayout
         android:layout_width="match_parent"

+ 2 - 2
ybvideoandroid/video/src/main/res/layout/activity_video_record.xml

@@ -89,7 +89,7 @@
                 android:layout_height="match_parent"
                 android:layout_weight="1"
                 android:gravity="center"
-                android:text="@string/video_time_15"
+                android:text="@string/video_time_60"
                 android:textColor="@color/fg_time_tx"
                 android:textSize="14dp" />
 
@@ -99,7 +99,7 @@
                 android:layout_height="match_parent"
                 android:layout_weight="1"
                 android:gravity="center"
-                android:text="@string/video_time_60"
+                android:text="@string/video_time_90"
                 android:textColor="@color/fg_time_tx"
                 android:textSize="14dp" />
 

+ 44 - 3
ybvideoandroid/video/src/main/res/layout/activity_video_report.xml

@@ -2,14 +2,55 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="vertical">
+    android:orientation="vertical"
+    android:background="#F9F9F9">
 
     <include layout="@layout/view_title" />
 
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        android:layout_marginTop="20dp">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="请选择你要举报的类型"
+            android:textSize="16sp"
+            android:textColor="@color/textColorBlack"
+            android:paddingLeft="13dp"
+            android:gravity="center_vertical" />
+        <TextView
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="*"
+            android:textSize="16sp"
+            android:textColor="#EA3F49"
+            android:gravity="center_vertical" />
+
+    </LinearLayout>
+
     <androidx.recyclerview.widget.RecyclerView
         android:id="@+id/recyclerView"
         android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:overScrollMode="never" />
+        android:layout_height="0dp"
+        android:layout_weight="1"
+        android:overScrollMode="never"
+        android:padding="16dp"
+        android:paddingLeft="10dp"
+        android:paddingRight="10dp"/>
+    
+    <!-- 固定提交按钮 -->
+    <Button
+        android:id="@+id/btn_submit"
+        android:layout_width="match_parent"
+        android:layout_height="45dp"
+        android:layout_margin="26dp"
+        android:background="@drawable/bg_submit"
+        android:text="提交"
+        android:textColor="#333333"
+        android:textSize="16sp"
+        android:textStyle="bold" />
 
 </LinearLayout>

+ 58 - 0
ybvideoandroid/video/src/main/res/layout/activity_video_report_description.xml

@@ -0,0 +1,58 @@
+<?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"
+    android:background="#F5F5F5">
+
+    <!-- 标题栏 -->
+    <include layout="@layout/view_title" />
+
+    <!-- 内容区域 -->
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:orientation="vertical"
+        android:padding="16dp">
+
+        <!-- 标题 -->
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="举报描述"
+            android:textSize="18sp"
+            android:textColor="#333333"
+            android:textStyle="bold"
+            android:layout_marginBottom="16dp" />
+
+        <!-- 输入框 -->
+        <EditText
+            android:id="@+id/et_description"
+            android:layout_width="match_parent"
+            android:layout_height="175dp"
+            android:background="@drawable/bg_edit_text"
+            android:padding="12dp"
+            android:gravity="top"
+            android:hint="请描述你举报该作品的原因,一旦发现违规我们将对该视频进行处理。"
+            android:textSize="14sp"
+            android:textColor="#333333"
+            android:textColorHint="#CCCCCC"
+            android:inputType="textMultiLine"
+            android:scrollbars="vertical"
+            android:maxLength="500" />
+
+        <!-- 提交按钮 -->
+        <Button
+            android:id="@+id/btn_submit"
+            android:layout_width="match_parent"
+            android:layout_height="45dp"
+            android:layout_marginTop="26dp"
+            android:background="@drawable/bg_submit"
+            android:text="提交"
+            android:textColor="@android:color/white"
+            android:textSize="16sp"
+            android:textStyle="bold" />
+
+    </LinearLayout>
+
+</LinearLayout>

+ 29 - 0
ybvideoandroid/video/src/main/res/layout/item_video_report_new.xml

@@ -0,0 +1,29 @@
+<FrameLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="57dp"
+    android:background="@drawable/bg_video_report_item_selector"
+    >
+
+    <TextView
+        android:id="@+id/text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:textColor="#000000"
+        android:textSize="16sp"
+        android:text="引战、歧视"
+        />
+
+    <TextView
+        android:id="@+id/bt_select"
+        android:layout_width="30dp"
+        android:layout_height="15dp"
+        android:gravity="center"
+        android:layout_gravity="bottom|right"
+        android:text="√"
+        android:background="@drawable/bg_video_report_select"
+        android:textColor="@color/white"
+        android:textStyle="bold"
+        />
+</FrameLayout>

+ 45 - 0
ybvideoandroid/video/src/main/res/layout/view_video_loading.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout 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="match_parent"
+    android:background="#50000000">
+
+    <!-- 左上角圆形进度条 -->
+    <com.yunbao.video.views.AnimatedCircleProgress
+        android:id="@+id/circle_progress"
+        android:layout_width="60dp"
+        android:layout_height="60dp"
+        android:layout_alignParentLeft="true"
+        android:layout_alignParentTop="true"
+        android:layout_marginLeft="30dp"
+        android:layout_marginTop="60dp"
+        app:cp_bg_color="#FFFFFFFF"
+        app:cp_fg_color="@color/global"
+        app:cp_stroke_width="6dp"
+        app:cp_max_progress="100"
+        app:cp_cur_progress="0" />
+
+    <!-- 取消按钮 -->
+    <ImageView
+        android:id="@+id/btn_cancel"
+        android:layout_width="30dp"
+        android:layout_height="30dp"
+        android:padding="8dp"
+        android:src="@mipmap/icon_video_process_close"
+        app:tint="@color/white"
+        android:visibility="gone"
+        />
+
+    <!-- 中间加载文本 -->
+    <TextView
+        android:id="@+id/loading_text"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_centerInParent="true"
+        android:text="加载中..."
+        android:textColor="#FFFFFF"
+        android:textSize="16sp"
+        android:textStyle="bold" />
+
+</RelativeLayout>

+ 1 - 0
ybvideoandroid/video/src/main/res/values/strings.xml

@@ -0,0 +1 @@
+<resources></resources>