Commit ed2f53bc by ydl

首页文章冥想动态剔除完成

parent d7ace444
...@@ -17,7 +17,7 @@ import com.yidianling.dynamic.R2; ...@@ -17,7 +17,7 @@ import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
import com.yidianling.dynamic.common.view.WrapGridLayoutManager; import com.yidianling.dynamic.common.view.WrapGridLayoutManager;
import com.yidianling.dynamic.model.Command; import com.yidianling.dynamic.model.Command;
import com.yidianling.dynamic.model.RecommendTrendImage; import com.ydl.ydlcommon.ui.ParcelableImage;
import com.yidianling.dynamic.model.RecommendedDiscuss; import com.yidianling.dynamic.model.RecommendedDiscuss;
import com.yidianling.dynamic.model.RecommendedTrend; import com.yidianling.dynamic.model.RecommendedTrend;
import com.ydl.webview.H5Params; import com.ydl.webview.H5Params;
...@@ -242,44 +242,44 @@ public class RecommendTrendAdapter extends RecyclerView.Adapter<RecyclerView.Vie ...@@ -242,44 +242,44 @@ public class RecommendTrendAdapter extends RecyclerView.Adapter<RecyclerView.Vie
// holderOne.text_zan_num.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(mContext,R.mipmap.newsfeed_like),null,null,null); // holderOne.text_zan_num.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(mContext,R.mipmap.newsfeed_like),null,null,null);
} }
List<RecommendTrendImage> recommendTrendImages = new ArrayList<RecommendTrendImage>(); List<ParcelableImage> parcelableImages = new ArrayList<ParcelableImage>();
List<RecommendTrendImage> recommendTrendBigImages = new ArrayList<RecommendTrendImage>(); List<ParcelableImage> recommendTrendBigImages = new ArrayList<ParcelableImage>();
recommendTrendImages.clear(); parcelableImages.clear();
recommendTrendBigImages.clear(); recommendTrendBigImages.clear();
recommendTrendBigImages = recommendedTrend.getTrendBigImages(); recommendTrendBigImages = recommendedTrend.getTrendBigImages();
recommendTrendImages = recommendedTrend.getTrendImages(); parcelableImages = recommendedTrend.getTrendImages();
dicussAdapter = new RecommendDicussAdapter(recommendedDiscusses, mContext); dicussAdapter = new RecommendDicussAdapter(recommendedDiscusses, mContext);
//图片 //图片
if (recommendTrendImages.size() > 3) { if (parcelableImages.size() > 3) {
holderOne.trend_img_rel.setVisibility(View.VISIBLE); holderOne.trend_img_rel.setVisibility(View.VISIBLE);
holderOne.trend_img_num_tv.setVisibility(View.VISIBLE); holderOne.trend_img_num_tv.setVisibility(View.VISIBLE);
holderOne.trend_img_num_tv.setText("共" + recommendTrendImages.size() + "张"); holderOne.trend_img_num_tv.setText("共" + parcelableImages.size() + "张");
holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 3)); holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 3));
} else if (recommendTrendImages.size() == 3) { } else if (parcelableImages.size() == 3) {
holderOne.trend_img_rel.setVisibility(View.VISIBLE); holderOne.trend_img_rel.setVisibility(View.VISIBLE);
holderOne.trend_img_num_tv.setVisibility(View.GONE); holderOne.trend_img_num_tv.setVisibility(View.GONE);
holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 3)); holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 3));
} else if (recommendTrendImages.size() == 2) { } else if (parcelableImages.size() == 2) {
holderOne.trend_img_rel.setVisibility(View.VISIBLE); holderOne.trend_img_rel.setVisibility(View.VISIBLE);
holderOne.trend_img_num_tv.setVisibility(View.GONE); holderOne.trend_img_num_tv.setVisibility(View.GONE);
holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 2)); holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 2));
} else if (recommendTrendImages.size() == 1) { } else if (parcelableImages.size() == 1) {
holderOne.trend_img_rel.setVisibility(View.VISIBLE); holderOne.trend_img_rel.setVisibility(View.VISIBLE);
holderOne.trend_img_num_tv.setVisibility(View.GONE); holderOne.trend_img_num_tv.setVisibility(View.GONE);
RecommendTrendImage trendImanull = new RecommendTrendImage("no"); ParcelableImage trendImanull = new ParcelableImage("no");
recommendTrendImages.add(trendImanull); parcelableImages.add(trendImanull);
holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 2)); holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 2));
} else { } else {
holderOne.trend_img_num_tv.setVisibility(View.GONE); holderOne.trend_img_num_tv.setVisibility(View.GONE);
holderOne.trend_img_rel.setVisibility(View.GONE); holderOne.trend_img_rel.setVisibility(View.GONE);
holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 1)); holderOne.trend_img_rcv.setLayoutManager(new WrapGridLayoutManager(mContext, 1));
} }
RecommendTrendImgAdapter trendImgAdapter = new RecommendTrendImgAdapter(recommendTrendImages, recommendTrendBigImages, mContext, trend_id); RecommendTrendImgAdapter trendImgAdapter = new RecommendTrendImgAdapter(parcelableImages, recommendTrendBigImages, mContext, trend_id);
trendImgAdapter.updateDate(recommendTrendImages, recommendTrendBigImages); trendImgAdapter.updateDate(parcelableImages, recommendTrendBigImages);
holderOne.trend_img_rcv.setAdapter(trendImgAdapter); holderOne.trend_img_rcv.setAdapter(trendImgAdapter);
......
...@@ -13,7 +13,7 @@ import android.widget.ImageView; ...@@ -13,7 +13,7 @@ import android.widget.ImageView;
import com.miracle.view.imageeditor.utils.FileUtils; import com.miracle.view.imageeditor.utils.FileUtils;
import com.ydl.ydl_image.module.GlideApp; import com.ydl.ydl_image.module.GlideApp;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.model.RecommendTrendImage; import com.ydl.ydlcommon.ui.ParcelableImage;
import java.util.List; import java.util.List;
...@@ -25,7 +25,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren ...@@ -25,7 +25,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren
private static final String TAG = "RecommendTrendImgAdapte"; private static final String TAG = "RecommendTrendImgAdapte";
protected Context mContext; protected Context mContext;
protected List<RecommendTrendImage> mDatas,mDatas1; protected List<ParcelableImage> mDatas,mDatas1;
private String trend_id; private String trend_id;
protected LayoutInflater mInflater; protected LayoutInflater mInflater;
...@@ -40,7 +40,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren ...@@ -40,7 +40,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren
this.mOnItemClickLister = lister; this.mOnItemClickLister = lister;
} }
public RecommendTrendImgAdapter(List<RecommendTrendImage> mDatas, List<RecommendTrendImage> mDatas1, Context mContext, String trend_id) { public RecommendTrendImgAdapter(List<ParcelableImage> mDatas, List<ParcelableImage> mDatas1, Context mContext, String trend_id) {
this.mContext = mContext; this.mContext = mContext;
this.mDatas = mDatas; this.mDatas = mDatas;
this.mDatas1=mDatas1; this.mDatas1=mDatas1;
...@@ -59,7 +59,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren ...@@ -59,7 +59,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren
@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
@Override @Override
public void onBindViewHolder(RecommendTrendImgViewHolder holder, final int position) { public void onBindViewHolder(RecommendTrendImgViewHolder holder, final int position) {
RecommendTrendImage trendImage=mDatas.get(position); ParcelableImage trendImage=mDatas.get(position);
String img_url=trendImage.getImage_url(); String img_url=trendImage.getImage_url();
if(!"no".equals(img_url)){ if(!"no".equals(img_url)){
Uri uriByPath = FileUtils.INSTANCE.getUriByPath(mContext, img_url); Uri uriByPath = FileUtils.INSTANCE.getUriByPath(mContext, img_url);
...@@ -85,7 +85,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren ...@@ -85,7 +85,7 @@ public class RecommendTrendImgAdapter extends RecyclerView.Adapter<RecommendTren
public void updateDate(List<RecommendTrendImage> mDatas, List<RecommendTrendImage> mDatas1) { public void updateDate(List<ParcelableImage> mDatas, List<ParcelableImage> mDatas1) {
this.mDatas = mDatas; this.mDatas = mDatas;
this.mDatas1=mDatas1; this.mDatas1=mDatas1;
notifyDataSetChanged(); notifyDataSetChanged();
......
...@@ -2,6 +2,7 @@ package com.yidianling.dynamic.model; ...@@ -2,6 +2,7 @@ package com.yidianling.dynamic.model;
import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.SerializedName;
import com.ydl.ydlcommon.bean.ShareData; import com.ydl.ydlcommon.bean.ShareData;
import com.ydl.ydlcommon.ui.ParcelableImage;
import java.util.List; import java.util.List;
...@@ -23,8 +24,8 @@ public class RecommendedTrend { ...@@ -23,8 +24,8 @@ public class RecommendedTrend {
private String trend_topic;//动态话题 private String trend_topic;//动态话题
private String read_num;//浏览数 private String read_num;//浏览数
private String zan_num;//赞数 private String zan_num;//赞数
private List<RecommendTrendImage> TrendImages;//动态图片集合 private List<ParcelableImage> TrendImages;//动态图片集合
private List<RecommendTrendImage> TrendBigImages;//动态图片(大图)集合 private List<ParcelableImage> TrendBigImages;//动态图片(大图)集合
private List<RecommendedDiscuss> TrednDiscuss;//动态评论集合 private List<RecommendedDiscuss> TrednDiscuss;//动态评论集合
private int DiscussNum;//评论数 private int DiscussNum;//评论数
private String topic_id;//话题id private String topic_id;//话题id
...@@ -133,11 +134,11 @@ public class RecommendedTrend { ...@@ -133,11 +134,11 @@ public class RecommendedTrend {
this.jump_title = jump_title; this.jump_title = jump_title;
} }
public List<RecommendTrendImage> getTrendBigImages() { public List<ParcelableImage> getTrendBigImages() {
return TrendBigImages; return TrendBigImages;
} }
public void setTrendBigImages(List<RecommendTrendImage> trendBigImages) { public void setTrendBigImages(List<ParcelableImage> trendBigImages) {
TrendBigImages = trendBigImages; TrendBigImages = trendBigImages;
} }
...@@ -281,11 +282,11 @@ public class RecommendedTrend { ...@@ -281,11 +282,11 @@ public class RecommendedTrend {
this.zan_num = zan_num; this.zan_num = zan_num;
} }
public List<RecommendTrendImage> getTrendImages() { public List<ParcelableImage> getTrendImages() {
return TrendImages; return TrendImages;
} }
public void setTrendImages(List<RecommendTrendImage> trendImages) { public void setTrendImages(List<ParcelableImage> trendImages) {
TrendImages = trendImages; TrendImages = trendImages;
} }
......
...@@ -28,7 +28,7 @@ import com.ydl.ydlcommon.base.config.YDLConstants; ...@@ -28,7 +28,7 @@ import com.ydl.ydlcommon.base.config.YDLConstants;
import com.ydl.ydlcommon.utils.SharedPreferencesEditor; import com.ydl.ydlcommon.utils.SharedPreferencesEditor;
import com.ydl.ydlcommon.utils.StatusBarUtils; import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.ydl.ydlcommon.view.NoScrollViewPager; import com.ydl.ydlcommon.view.NoScrollViewPager;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.bean.TrendTabEntity; import com.yidianling.dynamic.bean.TrendTabEntity;
import com.yidianling.dynamic.publishTrend.fragment.PublishQuestionAndTrendFragment; import com.yidianling.dynamic.publishTrend.fragment.PublishQuestionAndTrendFragment;
......
...@@ -17,7 +17,7 @@ import com.ydl.ydlcommon.base.BaseDialogFragment; ...@@ -17,7 +17,7 @@ import com.ydl.ydlcommon.base.BaseDialogFragment;
import com.ydl.ydlcommon.bean.ShareData; import com.ydl.ydlcommon.bean.ShareData;
import com.ydl.ydlcommon.view.dialog.CommonDialog; import com.ydl.ydlcommon.view.dialog.CommonDialog;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2; import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
......
...@@ -12,7 +12,7 @@ import android.widget.TextView; ...@@ -12,7 +12,7 @@ import android.widget.TextView;
import com.ydl.ydlcommon.bean.StatusBarOptions; import com.ydl.ydlcommon.bean.StatusBarOptions;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2; import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
......
...@@ -42,7 +42,7 @@ import com.ydl.ydlcommon.ui.LogoLoadingView; ...@@ -42,7 +42,7 @@ import com.ydl.ydlcommon.ui.LogoLoadingView;
import com.ydl.ydlcommon.utils.BuryPointUtils; import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.StatusBarUtils; import com.ydl.ydlcommon.utils.StatusBarUtils;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2; import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.adapter.TopicDetailMemberAdapter; import com.yidianling.dynamic.adapter.TopicDetailMemberAdapter;
......
...@@ -22,7 +22,7 @@ import android.widget.TextView; ...@@ -22,7 +22,7 @@ import android.widget.TextView;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.dynamic.DynamicFragment; import com.yidianling.dynamic.DynamicFragment;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2; import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.net.DynamicApiUtils; import com.yidianling.dynamic.common.net.DynamicApiUtils;
......
...@@ -24,7 +24,7 @@ import com.ydl.ydlcommon.utils.SharedPreferencesEditor ...@@ -24,7 +24,7 @@ import com.ydl.ydlcommon.utils.SharedPreferencesEditor
import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager import com.ydl.ydlcommon.view.WrapContentLinearLayoutManager
import com.yidianling.common.tools.LogUtil import com.yidianling.common.tools.LogUtil
import com.yidianling.common.tools.ToastUtil import com.yidianling.common.tools.ToastUtil
import com.yidianling.dynamic.DynamicConstants import com.yidianling.dynamic.bean.DynamicConstants
import com.yidianling.dynamic.R import com.yidianling.dynamic.R
import com.yidianling.dynamic.common.net.DynamicApiUtils import com.yidianling.dynamic.common.net.DynamicApiUtils
import com.yidianling.dynamic.model.* import com.yidianling.dynamic.model.*
......
...@@ -34,7 +34,6 @@ import android.widget.ImageView; ...@@ -34,7 +34,6 @@ import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import com.alibaba.android.arouter.facade.annotation.Route; import com.alibaba.android.arouter.facade.annotation.Route;
import com.cxzapp.yidianling.trends.trendsDetail.AdViewPagerAdapter; import com.cxzapp.yidianling.trends.trendsDetail.AdViewPagerAdapter;
...@@ -68,7 +67,7 @@ import com.ydl.ydlcommon.view.widgets.MyScrollview; ...@@ -68,7 +67,7 @@ import com.ydl.ydlcommon.view.widgets.MyScrollview;
import com.ydl.ydlcommon.view.widgets.RecyclerViewForScrollView; import com.ydl.ydlcommon.view.widgets.RecyclerViewForScrollView;
import com.yidianling.common.tools.LogUtil; import com.yidianling.common.tools.LogUtil;
import com.yidianling.common.tools.ToastUtil; import com.yidianling.common.tools.ToastUtil;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2; import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity2; import com.yidianling.dynamic.common.browsePictures.BrowsePicturesActivity2;
......
...@@ -23,7 +23,7 @@ import com.ydl.ydlcommon.utils.BuryPointUtils; ...@@ -23,7 +23,7 @@ import com.ydl.ydlcommon.utils.BuryPointUtils;
import com.ydl.ydlcommon.utils.ScreenUtil; import com.ydl.ydlcommon.utils.ScreenUtil;
import com.yidianling.common.tools.RxDeviceTool; import com.yidianling.common.tools.RxDeviceTool;
import com.yidianling.common.tools.RxImageTool; import com.yidianling.common.tools.RxImageTool;
import com.yidianling.dynamic.DynamicConstants; import com.yidianling.dynamic.bean.DynamicConstants;
import com.yidianling.dynamic.R; import com.yidianling.dynamic.R;
import com.yidianling.dynamic.R2; import com.yidianling.dynamic.R2;
import com.yidianling.dynamic.common.view.LooperTextView; import com.yidianling.dynamic.common.view.LooperTextView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment