广场 逻辑优化补全
This commit is contained in:
@@ -39,7 +39,7 @@ arouterCompiler = "1.5.2"
|
||||
arouterApi = "1.5.2"
|
||||
comSquareupRetrofit2Retrofit3 = "2.9.0"
|
||||
fastjson = "1.2.60"
|
||||
githubBaserecyclerviewadapterhelper = "2.9.30"
|
||||
githubBaserecyclerviewadapterhelper = "2.9.50"
|
||||
gsonVersion = "2.10.1"
|
||||
eventbusAnnotationProcessorVersion = "3.3.1"
|
||||
eventbusVersion = "3.3.1"
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.xscm.moduleutil;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
public class BaseEvent {
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import static android.view.View.GONE;
|
||||
import static android.view.View.VISIBLE;
|
||||
import static com.blankj.utilcode.util.ActivityUtils.startActivity;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.Spanned;
|
||||
import android.text.TextPaint;
|
||||
@@ -43,14 +44,15 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
super(R.layout.item_cirle_list);
|
||||
this.mPageType = pageType;
|
||||
}
|
||||
|
||||
public interface OnItemClickListener {
|
||||
void onDianzanClick(CircleListBean item);
|
||||
void onDianzanClick(int index,CircleListBean item);
|
||||
|
||||
void onHeadImageClick(CircleListBean item);
|
||||
|
||||
void onZsClick(CircleListBean item);
|
||||
void onZsClick(int idx,CircleListBean item);
|
||||
|
||||
void onDiandianClick(CircleListBean item);
|
||||
void onMoreClick(int idx,CircleListBean item);
|
||||
|
||||
void onPinglunClick(CircleListBean item);
|
||||
|
||||
@@ -65,6 +67,46 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
this.mListener = listener;
|
||||
}
|
||||
|
||||
|
||||
public static final String PAYLOAD_LIKE = "like";
|
||||
|
||||
public void updateLikeStatusOnly(int position, int isLike) {
|
||||
notifyItemChanged(position, PAYLOAD_LIKE);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void convertPayloads(@NonNull BaseViewHolder helper, CircleListBean item, @NonNull List<Object> payloads) {
|
||||
super.convertPayloads(helper, item, payloads);
|
||||
if (payloads.isEmpty()) {
|
||||
convert(helper, item);
|
||||
} else {
|
||||
Object payload = payloads.get(0);
|
||||
if (payload instanceof Bundle) {
|
||||
Bundle diff = (Bundle) payload;
|
||||
if (diff.containsKey("like_num")) {
|
||||
helper.setText(R.id.dy_fabulous, diff.getString("like_num"));
|
||||
if (diff.containsKey("is_like")){
|
||||
if (diff.getInt("is_like") == 1) {
|
||||
helper.setImageResource(R.id.dianzan_image, R.mipmap.dongtai_hudong_yidianzan);
|
||||
} else {
|
||||
helper.setImageResource(R.id.dianzan_image, com.xscm.moduleutil.R.mipmap.dongtai_hudong_dianzan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (diff.containsKey("comment_num")) {
|
||||
helper.setText(R.id.dy_comment, diff.getString("comment_num"));
|
||||
}
|
||||
if (diff.containsKey("rewards_num")) {
|
||||
double rewardNum = diff.getString("rewards_num") != null ? Double.parseDouble(item.getRewards_num()) : 0;
|
||||
helper.setText(R.id.dy_zs, NumberFormatUtils.formatRewardNumber(rewardNum));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(BaseViewHolder helper, CircleListBean item) {
|
||||
helper.addOnClickListener(com.xscm.moduleutil.R.id.dianzan)
|
||||
@@ -89,8 +131,8 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
|
||||
// 设置点击回调
|
||||
helper.getView(com.xscm.moduleutil.R.id.dianzan).setOnClickListener(v -> {
|
||||
if (mListener != null){
|
||||
mListener.onDianzanClick(item);
|
||||
if (mListener != null) {
|
||||
mListener.onDianzanClick(helper.getPosition(),item);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -99,11 +141,11 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
});
|
||||
|
||||
helper.getView(com.xscm.moduleutil.R.id.zs).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onZsClick(item);
|
||||
if (mListener != null) mListener.onZsClick(helper.getPosition(),item);
|
||||
});
|
||||
|
||||
helper.getView(R.id.diandian).setOnClickListener(v -> {
|
||||
if (mListener != null) mListener.onDiandianClick(item);
|
||||
if (mListener != null) mListener.onMoreClick(helper.getPosition(),item);
|
||||
});
|
||||
|
||||
helper.getView(R.id.pinglun).setOnClickListener(v -> {
|
||||
@@ -163,7 +205,7 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
TextView view = helper.getView(R.id.dy_content_tv);
|
||||
view.setVisibility(VISIBLE);
|
||||
}
|
||||
// 创建 SpannableString 来拼接 title 并设置点击事件
|
||||
// 创建 SpannableString 来拼接 title 并设置点击事件
|
||||
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
|
||||
spannableStringBuilder.append(content).append(" "); // 添加原始内容
|
||||
if (item.getTitle() != null) {
|
||||
@@ -206,27 +248,25 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
|
||||
if (item.getIs_like() == 1) {
|
||||
helper.setImageResource(R.id.dianzan_image, R.mipmap.dongtai_hudong_yidianzan);
|
||||
// helper.setText(R.id.dy_fabulous, String.valueOf(Integer.parseInt(item.getLike_num()) + 1));
|
||||
} else {
|
||||
helper.setImageResource(R.id.dianzan_image, com.xscm.moduleutil.R.mipmap.dongtai_hudong_dianzan);
|
||||
// helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
}
|
||||
|
||||
helper.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
|
||||
if (mPageType==PAGE_SEARCH){
|
||||
if (mPageType == PAGE_SEARCH) {
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
}else {
|
||||
if (item.getUser_id()==SpUtil.getUserId()){
|
||||
} else {
|
||||
if (item.getUser_id() == SpUtil.getUserId()) {
|
||||
helper.setVisible(R.id.gensui, false);
|
||||
}else {
|
||||
} else {
|
||||
helper.setVisible(R.id.gensui, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (item.getRoom_id() != null && !item.getRoom_id().equals("0")) {
|
||||
helper.setText(R.id.gensui, "跟随");
|
||||
} else if (item.getRoom_id() == null || item.getRoom_id().equals("0")){
|
||||
} else if (item.getRoom_id() == null || item.getRoom_id().equals("0")) {
|
||||
helper.setText(R.id.gensui, "私信");
|
||||
}
|
||||
//分享数
|
||||
@@ -251,7 +291,6 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
String[] arrIv = item.getImages().split(",");
|
||||
OneImageYuanJiaoAdapter oneImageYuanJiaoAdapter = new OneImageYuanJiaoAdapter(mContext);
|
||||
MyGridView recyclerView = helper.getView(R.id.dy_image_recyc);
|
||||
recyclerView.setNumColumns(3);
|
||||
recyclerView.setAdapter(oneImageYuanJiaoAdapter);
|
||||
oneImageYuanJiaoAdapter.getList_adapter().clear();
|
||||
|
||||
@@ -262,51 +301,25 @@ public class CirleListAdapter extends BaseQuickAdapter<CircleListBean, BaseViewH
|
||||
recyclerView.setOnItemClickListener((parent, view, position, id) -> {
|
||||
FullScreenUtil.showFullScreenDialog(mContext, position, oneImageYuanJiaoAdapter.getList_adapter());
|
||||
});
|
||||
}else {
|
||||
} else {
|
||||
helper.getView(R.id.dy_image_recyc).setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (item.getLike_list() == null){
|
||||
if (item.getLike_list() == null) {
|
||||
helper.getView(R.id.rela).setVisibility(GONE);
|
||||
helper.getView(R.id.view).setVisibility(VISIBLE);
|
||||
}else {
|
||||
} else {
|
||||
helper.getView(R.id.rela).setVisibility(VISIBLE);
|
||||
helper.getView(R.id.view).setVisibility(GONE);
|
||||
RecyclerView recyclerView= helper.getView(R.id.recycle_view);
|
||||
RecyclerView recyclerView = helper.getView(R.id.recycle_view);
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
LikeUserAdapter<CircleListBean.LikeList> likeUserAdapter = new LikeUserAdapter<>();
|
||||
recyclerView.setAdapter(likeUserAdapter);
|
||||
likeUserAdapter.setNewData(item.getLike_list());
|
||||
helper.setText(R.id.pinglun_tv, item.getLike_num()+"人点赞");
|
||||
helper.setText(R.id.pinglun_tv, item.getLike_num() + "人点赞");
|
||||
}
|
||||
|
||||
}
|
||||
public static final String PAYLOAD_LIKE = "like";
|
||||
|
||||
public void updateLikeStatusOnly(int position, int isLike) {
|
||||
notifyItemChanged(position, PAYLOAD_LIKE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull BaseViewHolder holder, int position, @NonNull List<Object> payloads) {
|
||||
if (payloads.isEmpty()) {
|
||||
onBindViewHolder(holder, position); // 全量绑定
|
||||
} else {
|
||||
for (Object payload : payloads) {
|
||||
if (payload.equals(PAYLOAD_LIKE)) {
|
||||
CircleListBean item = getData().get(position);
|
||||
if (item.getIs_like() == 1) {
|
||||
holder.setImageResource(R.id.dianzan_image, R.mipmap.dongtai_hudong_yidianzan);
|
||||
holder.setText(R.id.dy_fabulous, String.valueOf(Integer.parseInt(item.getLike_num()) + 1));
|
||||
} else {
|
||||
holder.setImageResource(R.id.dianzan_image, com.xscm.moduleutil.R.mipmap.dongtai_hudong_dianzan);
|
||||
holder.setText(R.id.dy_fabulous, item.getLike_num());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -109,16 +109,6 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
if (type==0){
|
||||
MvpPre.getGiftList("0", type, roomId);
|
||||
}
|
||||
// if (id.equals("0")) {
|
||||
// MvpPre.giftPack();
|
||||
// } else {
|
||||
// if (type == 0) {
|
||||
// MvpPre.getGiftList("0", type, roomId);
|
||||
// } else {
|
||||
// MvpPre.getGiftList(id, type, roomId);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -207,8 +197,6 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
|
||||
giftPackList.addAll(giftPackBean);
|
||||
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
|
||||
for (int j = 0; j < pageCount; j++) {
|
||||
// mAdapter = new GiftTwoAdapter(getActivity(), data, j, "0");
|
||||
// mBinding.rvGift.setAdapter(mAdapter);
|
||||
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, j, "0");
|
||||
mBinding.rvGift.setAdapter(packAdapter);
|
||||
}
|
||||
|
||||
@@ -14,32 +14,10 @@ import com.xscm.moduleutil.utils.ImageUtils;
|
||||
|
||||
public class OneImageYuanJiaoAdapter extends MyBaseAdapter<String> {
|
||||
private Context context;
|
||||
|
||||
// public OneImageYuanJiaoAdapter(Context context) {
|
||||
// this.context = context;
|
||||
// }
|
||||
|
||||
public OneImageYuanJiaoAdapter(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// protected void convert(BaseViewHolder helper, String item) {
|
||||
// helper.addOnClickListener(R.id.fiv);
|
||||
//
|
||||
// helper.setVisible(R.id.ll_del, false);
|
||||
// QMUIRadiusImageView image = helper.getView(R.id.fiv);
|
||||
// RequestOptions options = new RequestOptions()
|
||||
// .centerCrop()
|
||||
// .placeholder(R.color.white)
|
||||
// .diskCacheStrategy(DiskCacheStrategy.ALL);
|
||||
// Glide.with(mContext)
|
||||
// .load(item)
|
||||
// .apply(options)
|
||||
// .into(image);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public View getView(int position, View convertView, ViewGroup parent) {
|
||||
ViewHolder VH;
|
||||
@@ -53,10 +31,8 @@ public class OneImageYuanJiaoAdapter extends MyBaseAdapter<String> {
|
||||
VH.iv_del.setVisibility(View.GONE);
|
||||
|
||||
if (!TextUtils.isEmpty(list_adapter.get(position))) {
|
||||
|
||||
ImageUtils.loadHeadCC(list_adapter.get(position),VH.tv_title);
|
||||
}
|
||||
//
|
||||
return convertView;
|
||||
}
|
||||
|
||||
@@ -64,27 +40,10 @@ public class OneImageYuanJiaoAdapter extends MyBaseAdapter<String> {
|
||||
public static class ViewHolder {
|
||||
RoundedImageView tv_title;
|
||||
ImageView iv_del;
|
||||
RelativeLayout layoutImg;
|
||||
|
||||
public ViewHolder(View convertView) {
|
||||
tv_title = convertView.findViewById(R.id.fiv);
|
||||
iv_del = convertView.findViewById(R.id.iv_del);
|
||||
// layoutImg = convertView.findViewById(R.id.layout_img);
|
||||
//
|
||||
// int screenWidth = QMUIDisplayHelper.getScreenWidth(BaseApplication.mApplication) - QMUIDisplayHelper.dp2px(BaseApplication.mApplication, 24);
|
||||
//
|
||||
// int imgWidth = screenWidth*1/3-QMUIDisplayHelper.dp2px(BaseApplication.mApplication, 10);
|
||||
//
|
||||
// RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) layoutImg.getLayoutParams();
|
||||
// params.width = imgWidth;
|
||||
// params.height = imgWidth;
|
||||
// layoutImg.setLayoutParams(params);
|
||||
//
|
||||
// params = (RelativeLayout.LayoutParams) tv_title.getLayoutParams();
|
||||
// params.width = imgWidth;
|
||||
// params.height = imgWidth;
|
||||
// tv_title.setLayoutParams(params);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,32 +786,6 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
}
|
||||
}
|
||||
|
||||
//static 代码段可以防止内存泄露
|
||||
static {
|
||||
//设置全局的Header构建器
|
||||
SmartRefreshLayout.setDefaultRefreshHeaderCreator(new DefaultRefreshHeaderCreator() {
|
||||
@Override
|
||||
public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
|
||||
ClassicsHeader header = new ClassicsHeader(context);
|
||||
header.setDrawableSize(20);
|
||||
header.setFinishDuration(0);
|
||||
return header;//.setTimeFormat(new DynamicTimeFormat("更新于 %s"));//指定为经典Header,默认是 贝塞尔雷达Header
|
||||
// return new CustomRefreshHeader(context);//.setTimeFormat(new DynamicTimeFormat("更新于 %s"));//指定为经典Header,默认是 贝塞尔雷达Header
|
||||
}
|
||||
});
|
||||
//设置全局的Footer构建器
|
||||
SmartRefreshLayout.setDefaultRefreshFooterCreator(new DefaultRefreshFooterCreator() {
|
||||
@Override
|
||||
public RefreshFooter createRefreshFooter(Context context, RefreshLayout layout) {
|
||||
ClassicsFooter classicsFooter = new ClassicsFooter(context);
|
||||
classicsFooter.setDrawableSize(20);
|
||||
classicsFooter.setFinishDuration(0);
|
||||
//指定为经典Footer,默认是 BallPulseFooter
|
||||
return classicsFooter;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {
|
||||
|
||||
|
||||
@@ -11,28 +11,28 @@ import lombok.Data;
|
||||
*/
|
||||
@Data
|
||||
public class CircleListBean {
|
||||
private int id;//语圈ID
|
||||
private int user_id;//用户ID
|
||||
private String nickname;//用户昵称
|
||||
private String avatar;//用户头像
|
||||
private int is_like;//我是否点赞(0没有,1点赞)
|
||||
private int sex;//性别 1男2女
|
||||
private String content;//内容
|
||||
private String like_num;//点赞数
|
||||
private String rewards_num; //打赏金额
|
||||
private String is_room;//作者是否在房间中(1在,0不在)
|
||||
private String room_id;//作者所在房间ID (is_room =0 此值小于0 )
|
||||
private String comment_num;//评论数
|
||||
private int is_recommend;//1非推荐2推荐
|
||||
private String ip;//活跃地址
|
||||
private String images;////图片 JSON字符串 封面获取第一张
|
||||
private String createtime;//时间
|
||||
private String topic_id;
|
||||
private String share_url;
|
||||
private List<HeatedBean> title;//话题列表
|
||||
public int id;//语圈ID
|
||||
public int user_id;//用户ID
|
||||
public String nickname;//用户昵称
|
||||
public String avatar;//用户头像
|
||||
public int is_like;//我是否点赞(0没有,1点赞)
|
||||
public int sex;//性别 1男2女
|
||||
public String content;//内容
|
||||
public String like_num;//点赞数
|
||||
public String rewards_num; //打赏金额
|
||||
public String is_room;//作者是否在房间中(1在,0不在)
|
||||
public String room_id;//作者所在房间ID (is_room =0 此值小于0 )
|
||||
public String comment_num;//评论数
|
||||
public int is_recommend;//1非推荐2推荐
|
||||
public String ip;//活跃地址
|
||||
public String images;////图片 JSON字符串 封面获取第一张
|
||||
public String createtime;//时间
|
||||
public String topic_id;
|
||||
public String share_url;
|
||||
public List<HeatedBean> title;//话题列表
|
||||
|
||||
private String read_num;//阅读数
|
||||
private List<LikeList> like_list;
|
||||
public String read_num;//阅读数
|
||||
public List<LikeList> like_list;
|
||||
|
||||
|
||||
@Data
|
||||
|
||||
@@ -5,11 +5,14 @@ import com.xscm.moduleutil.BaseEvent;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/10
|
||||
*@description:发布头条需要的参数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class HeadlineBean extends BaseEvent implements Serializable {
|
||||
private String countdown;
|
||||
|
||||
@@ -3,9 +3,11 @@ package com.xscm.moduleutil.bean;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class MqttXlhEnd extends BaseEvent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -4,7 +4,9 @@ package com.xscm.moduleutil.bean.room;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class RoomUpPitBean extends BaseEvent {
|
||||
private String id;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.xscm.moduleutil.diff
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.recyclerview.widget.DiffUtil
|
||||
import com.xscm.moduleutil.bean.CircleListBean
|
||||
|
||||
|
||||
class CircleListDiffCallback(
|
||||
private val oldList: List<CircleListBean>?,
|
||||
private val newList: List<CircleListBean>?
|
||||
) :
|
||||
DiffUtil.Callback() {
|
||||
override fun getOldListSize(): Int {
|
||||
return oldList?.size ?: 0
|
||||
}
|
||||
|
||||
override fun getNewListSize(): Int {
|
||||
return newList?.size ?: 0
|
||||
}
|
||||
|
||||
override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
||||
return oldList!![oldItemPosition].id == newList!![newItemPosition].id
|
||||
}
|
||||
|
||||
override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
|
||||
val oldItem = oldList!![oldItemPosition]
|
||||
val newItem = newList!![newItemPosition]
|
||||
|
||||
// 判断核心数据是否一致(排除动态字段)
|
||||
if (!equalsStr(oldItem.nickname, newItem.nickname)) return false
|
||||
if (!equalsStr(oldItem.avatar, newItem.avatar)) return false
|
||||
if (!equalsStr(oldItem.content, newItem.content)) return false
|
||||
if (oldItem.is_like != newItem.is_like) return false
|
||||
if (oldItem.sex != newItem.sex) return false
|
||||
if (!equalsStr(oldItem.images, newItem.images)) return false
|
||||
|
||||
// 动态字段不参与整体比较(让 getChangePayload 控制)
|
||||
return equalsStr(oldItem.rewards_num, newItem.rewards_num)
|
||||
&& equalsStr(oldItem.like_num, newItem.like_num)
|
||||
&& equalsStr(oldItem.comment_num, newItem.comment_num)
|
||||
// && equalsStr(oldItem.read_num, newItem.read_num)
|
||||
}
|
||||
|
||||
override fun getChangePayload(oldItemPosition: Int, newItemPosition: Int): Any? {
|
||||
val oldItem = oldList!![oldItemPosition]
|
||||
val newItem = newList!![newItemPosition]
|
||||
|
||||
val diff = Bundle()
|
||||
|
||||
if (!equalsStr(oldItem.rewards_num, newItem.rewards_num)) {
|
||||
diff.putString("rewards_num", newItem.rewards_num)
|
||||
}
|
||||
if (!equalsStr(oldItem.like_num, newItem.like_num)) {
|
||||
diff.putString("like_num", newItem.like_num)
|
||||
diff.putInt("is_like",newItem.is_like)
|
||||
}
|
||||
if (!equalsStr(oldItem.comment_num, newItem.comment_num)) {
|
||||
diff.putString("comment_num", newItem.comment_num)
|
||||
}
|
||||
// if (!equalsStr(oldItem.read_num, newItem.read_num)) {
|
||||
// diff.putString("read_num", newItem.read_num)
|
||||
// }
|
||||
|
||||
return if (diff.size() == 0) null else diff
|
||||
}
|
||||
|
||||
private fun equalsStr(a: String?, b: String?): Boolean {
|
||||
if (a == null && b == null) return true
|
||||
if (a == null || b == null) return false
|
||||
return a == b
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,9 @@ package com.xscm.moduleutil.event;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class CabinEvent extends BaseEvent {
|
||||
private boolean joined;
|
||||
|
||||
@@ -4,12 +4,14 @@ import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/23
|
||||
*@description: 特效设置
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
@@ -11,6 +12,7 @@ import lombok.NoArgsConstructor;
|
||||
*@data 2025/9/22
|
||||
*@description: 关闭飘屏
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
||||
@@ -3,12 +3,14 @@ package com.xscm.moduleutil.event;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time 2025年7月30日01:35:52$ $
|
||||
* @Description 打赏成功$
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class GiftRewardEvent extends BaseEvent {
|
||||
private int points;
|
||||
|
||||
@@ -3,12 +3,14 @@ package com.xscm.moduleutil.event;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 小时榜飘屏
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class HourlyBean extends BaseEvent implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -13,12 +13,14 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time $ $
|
||||
* @Description 从声望获取到的参数$
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class MqttBean extends BaseEvent {
|
||||
private String room_id;
|
||||
|
||||
@@ -3,11 +3,14 @@ package com.xscm.moduleutil.event;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/24
|
||||
*@description: 背景音乐
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class MusicEvent extends BaseEvent {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.xscm.moduleutil.event;
|
||||
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class PlazaEvent extends BaseEvent {
|
||||
public static final int DELETE_ZONE = 1009;
|
||||
public static final int MODIFY_ZONE = 1008;
|
||||
public static final int ADD_ZONE = 1007;
|
||||
private int msgId;
|
||||
private int type;//DELETE_ZONE : 删除 MODIFY_ZONE : 修改 ADD_ZONE : 新增
|
||||
}
|
||||
@@ -4,8 +4,10 @@ import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AllArgsConstructor
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
||||
@@ -5,7 +5,9 @@ import com.xscm.moduleutil.BaseEvent;
|
||||
import com.xscm.moduleutil.bean.RoonGiftModel;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class RoomGiftGiveEvent extends BaseEvent {
|
||||
public String userId;
|
||||
|
||||
@@ -5,12 +5,14 @@ import android.view.SurfaceView;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @Author lxj$
|
||||
* @Time $ $
|
||||
* @Description 判断是否是电影房$
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class SurfaceEvent extends BaseEvent {
|
||||
|
||||
|
||||
@@ -3,11 +3,14 @@ package com.xscm.moduleutil.event;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/7/15
|
||||
*@description: 这是im展示需要显示的未读消息数
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class UnreadCountEvent extends BaseEvent {
|
||||
private long aLong;
|
||||
|
||||
@@ -198,12 +198,6 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
|
||||
@Override
|
||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||
// giftLabelBeanList = new ArrayList<>();
|
||||
// giftLabelBeanList.addAll(giftLabelBeans);
|
||||
// GiftLabelBean giftLabelBean = new GiftLabelBean();
|
||||
// giftLabelBean.setId("0");
|
||||
// giftLabelBean.setName("背包");
|
||||
// giftLabelBeans.add(0, giftLabelBean);
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans,fragmentList,""));
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
@@ -244,29 +238,8 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
}
|
||||
return null;
|
||||
}
|
||||
private GiftPackBean giftModel = null;
|
||||
private int getSelectedGift() {
|
||||
int currentItem = mBinding.viewPager.getCurrentItem();
|
||||
// if (currentItem < 1) { //比2小是才是礼物
|
||||
// GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
// roonGiftModel = fragment.getGiftList();
|
||||
// }
|
||||
// else {
|
||||
// GiftFragment fragment = (GiftFragment) fragmentList.get(currentItem);
|
||||
// giftModel = fragment.getmData();
|
||||
// }
|
||||
|
||||
// if (currentItem < 1) { //比1小的是背包
|
||||
// GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
// if (fragment != null && giftModel == null) {
|
||||
// giftModel = fragment.mGiftList();
|
||||
// }
|
||||
// } else {
|
||||
// GiftTwoDetailsFragment fragment = (GiftTwoDetailsFragment) fragmentList.get(currentItem);
|
||||
// if (fragment != null && roonGiftModel == null) {
|
||||
// roonGiftModel = fragment.getGiftList();
|
||||
// }
|
||||
// }
|
||||
return currentItem;
|
||||
}
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
@@ -278,24 +251,6 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
|
||||
private void giveGift(String num) {
|
||||
getSelectedGift();
|
||||
int currentItem = mBinding.viewPager.getCurrentItem();
|
||||
String userId = user_id;
|
||||
// if (currentItem < 1) {
|
||||
// if (roonGiftModel == null) {
|
||||
// ToastUtils.show("请选择礼物");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (TextUtils.isEmpty(num)) {
|
||||
// ToastUtils.show("请选择打赏礼物数量");
|
||||
// return;
|
||||
// }
|
||||
// if (Integer.valueOf(num) <= 0) {
|
||||
// ToastUtils.show("请选择打赏礼物数量");
|
||||
// return;
|
||||
// }
|
||||
// } else {
|
||||
if (roonGiftModel == null) {
|
||||
ToastUtils.show("请选择礼物");
|
||||
return;
|
||||
@@ -309,19 +264,10 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
ToastUtils.show("请选择打赏礼物数量");
|
||||
return;
|
||||
}
|
||||
// }
|
||||
|
||||
// if (currentItem == 0) {
|
||||
//礼物打赏
|
||||
giftNumber = num;
|
||||
MvpPre.reward_zone(circle_id, roonGiftModel.getGift_id(), num, "1");
|
||||
// } else {
|
||||
//背包礼物打赏
|
||||
// giftNumber = num;
|
||||
// roomGiftGiveEvent = new RoomGiftGiveEvent(userId, roomId, pit, num, 1, giftModel, null);
|
||||
//
|
||||
// MvpPre.giveBackGift(userId, giftModel.getGift_id(), roomId, pit, num, giftModel, 1);
|
||||
// }
|
||||
}
|
||||
@Override
|
||||
public void setGiftList(List<RoonGiftModel> roonGiftModels,int type) {
|
||||
|
||||
@@ -154,18 +154,6 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<!-- <com.makeramen.roundedimageview.RoundedImageView-->
|
||||
<!-- android:id="@+id/dy_oneimage_iv"-->
|
||||
<!-- android:layout_width="200dp"-->
|
||||
<!-- android:layout_height="200dp"-->
|
||||
<!-- android:scaleType="centerCrop"-->
|
||||
<!-- android:visibility="gone"-->
|
||||
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
|
||||
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
|
||||
<!-- app:layout_constraintTop_toTopOf="parent"-->
|
||||
<!-- app:riv_corner_radius="5dp" />-->
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<FrameLayout
|
||||
|
||||
@@ -1,10 +1,20 @@
|
||||
package com.xscm.modulemain
|
||||
|
||||
import android.content.Context
|
||||
import com.blankj.utilcode.util.LogUtils
|
||||
import com.opensource.svgaplayer.utils.log.SVGALogger
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
import com.scwang.smartrefresh.layout.api.DefaultRefreshFooterCreator
|
||||
import com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator
|
||||
import com.scwang.smartrefresh.layout.api.RefreshFooter
|
||||
import com.scwang.smartrefresh.layout.api.RefreshHeader
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout
|
||||
import com.scwang.smartrefresh.layout.footer.ClassicsFooter
|
||||
import com.scwang.smartrefresh.layout.header.ClassicsHeader
|
||||
import com.xscm.modulemain.widget.WheatLayoutSingManager
|
||||
import com.xscm.moduleutil.base.CommonAppContext
|
||||
|
||||
|
||||
open class Application : CommonAppContext() {
|
||||
|
||||
override fun onCreate() {
|
||||
@@ -16,6 +26,27 @@ open class Application : CommonAppContext() {
|
||||
// 默认情况下,SVGA 内部不会输出任何 log,所以需要手动设置为 true
|
||||
SVGALogger.setLogEnabled(false)
|
||||
LogUtils.getConfig().isLogSwitch = true
|
||||
|
||||
|
||||
//设置全局的Header构建器
|
||||
SmartRefreshLayout.setDefaultRefreshHeaderCreator { context, _ ->
|
||||
val header = ClassicsHeader(context)
|
||||
header.setDrawableSize(20f)
|
||||
// header.setFinishDuration(0)
|
||||
header.setTextSizeTitle(12f)
|
||||
header.setTextSizeTime(10f)
|
||||
header
|
||||
}
|
||||
|
||||
//设置全局的Footer构建器
|
||||
SmartRefreshLayout.setDefaultRefreshFooterCreator { context, _ ->
|
||||
val classicsFooter = ClassicsFooter(context)
|
||||
classicsFooter.setDrawableSize(20f)
|
||||
// classicsFooter.setFinishDuration(0)
|
||||
classicsFooter.setTextSizeTitle(12f)
|
||||
//指定为经典Footer,默认是 BallPulseFooter
|
||||
classicsFooter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -996,6 +996,13 @@ public class MainActivity extends BaseMvpActivity<HomePresenter, ActivityMainBin
|
||||
}
|
||||
}
|
||||
|
||||
public void isShowLoading(boolean isShow){
|
||||
if (isShow) {
|
||||
mBinding.coolWaitView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBinding.coolWaitView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.xscm.modulemain.activity.plaza.activity;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.os.Handler;
|
||||
@@ -15,10 +17,12 @@ import android.widget.Toast;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.blankj.utilcode.util.ToastUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.ActivityDynamicDetailBinding;
|
||||
@@ -27,6 +31,7 @@ import com.xscm.modulemain.activity.plaza.contacts.CircleContacts;
|
||||
import com.xscm.modulemain.activity.plaza.presenter.CirclePresenter;
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.modulemain.manager.RoomManager;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
import com.xscm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.xscm.moduleutil.adapter.CommentAdapter;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
@@ -34,7 +39,9 @@ import com.xscm.moduleutil.bean.CommentBean;
|
||||
import com.xscm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.xscm.moduleutil.bean.HeatedBean;
|
||||
import com.xscm.moduleutil.dialog.ConfirmDialog;
|
||||
import com.xscm.moduleutil.diff.CircleListDiffCallback;
|
||||
import com.xscm.moduleutil.event.GiftRewardEvent;
|
||||
import com.xscm.moduleutil.event.PlazaEvent;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ChatLauncher;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
@@ -42,11 +49,16 @@ import com.xscm.moduleutil.widget.dialog.CommentDialogFragment;
|
||||
import com.xscm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.xscm.modulemain.dialog.ShareDialog;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
|
||||
/**
|
||||
* @author qx
|
||||
@@ -62,11 +74,8 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
private int currentReplyId = 0; // 记录当前正在回复的评论ID
|
||||
private String TreplyTo = "";
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
MvpPre.topicId(zone_id, 2);
|
||||
}
|
||||
List<CircleListBean> circleList = new ArrayList<>();
|
||||
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
@@ -79,15 +88,8 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
mBinding.recycleView.setAdapter(cirleListAdapter);
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId() + "");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
cirleListAdapter.updateLikeStatusOnly(position, item.getIs_like());
|
||||
}
|
||||
public void onDianzanClick(int index, CircleListBean item) {
|
||||
MvpPre.likeZone(index, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -98,19 +100,18 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()),item.getUser_id() + "",position, getSupportFragmentManager());
|
||||
public void onZsClick(int position, CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), item.getUser_id() + "", position, getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(DynamicDetailActivity.this, item.getContent(), item.getShare_url(), item.getId()+"",3,item.getUser_id() + "",item);
|
||||
public void onMoreClick(int idx, CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(DynamicDetailActivity.this, item.getContent(), item.getShare_url(), item.getId() + "", 3, item.getUser_id() + "", item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
MvpPre.deleteZone(idx, item);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
@@ -126,14 +127,22 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
CommentDialogFragment.show(String.valueOf(item.getId()), getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@SuppressLint("CheckResult")
|
||||
@Override
|
||||
public void onGensui(CircleListBean item) {
|
||||
if (item.getRoom_id()!=null && !item.getRoom_id().equals("0")) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id(),"",null);
|
||||
if (item.getRoom_id() != null && !item.getRoom_id().equals("0")) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id(), "", null);
|
||||
|
||||
Observable.timer(1000, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).subscribe(aLong -> {
|
||||
for (int i = 0; i < ActivityUtils.getActivityList().size(); i++) {
|
||||
if (ActivityUtils.getActivityList().get(i) instanceof DynamicDetailActivity || ActivityUtils.getActivityList().get(i) instanceof DynamicListActivity) {
|
||||
ActivityUtils.getActivityList().get(i).finish();
|
||||
}
|
||||
}
|
||||
});
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页热门列表").withString("roomId", item.getRoom_id()).navigation();
|
||||
}else {
|
||||
ChatLauncher.getInstance().launchC2CChat(DynamicDetailActivity.this, item.getUser_id()+"");
|
||||
} else {
|
||||
ChatLauncher.getInstance().launchC2CChat(DynamicDetailActivity.this, item.getUser_id() + "");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -144,14 +153,6 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
commentAdapter.setOnCommentInteractionListener(this);
|
||||
|
||||
|
||||
// mBinding.etInput.setOnFocusChangeListener((v, hasFocus) -> {
|
||||
// if (hasFocus) {
|
||||
// new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||
// mBinding.scrollView.fullScroll(View.FOCUS_DOWN);
|
||||
// }, 200);
|
||||
// }
|
||||
// });
|
||||
|
||||
// 在 initData() 中添加:
|
||||
final View rootView = findViewById(android.R.id.content);
|
||||
final View inputBar = mBinding.clInput;
|
||||
@@ -180,20 +181,24 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
});
|
||||
|
||||
|
||||
// 点击输入框自动弹出键盘
|
||||
// 点击输入框自动弹出键盘
|
||||
mBinding.etInput.setOnClickListener(v -> {
|
||||
mBinding.etInput.requestFocus();
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(mBinding.etInput, InputMethodManager.SHOW_IMPLICIT);
|
||||
});
|
||||
|
||||
}
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEvent(GiftRewardEvent event) {
|
||||
|
||||
MvpPre.topicId(zone_id, 2);
|
||||
// cirleListAdapter.notifyItemChanged(event.getPoints());
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEvent(BaseEvent event) {
|
||||
if (event instanceof GiftRewardEvent) {
|
||||
MvpPre.getCircleDetail(((GiftRewardEvent) event).getPoints(),
|
||||
circleList.get(((GiftRewardEvent) event).getPoints()));
|
||||
EventBus.getDefault().post(new PlazaEvent(circleList.get(((GiftRewardEvent) event).getPoints()).id, PlazaEvent.MODIFY_ZONE));
|
||||
}
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId() == R.id.tv_send) {
|
||||
if (mBinding.etInput.getText().toString().isEmpty()) {
|
||||
@@ -235,7 +240,7 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
public void getCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@@ -245,21 +250,31 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone(int type) {
|
||||
if (type == 1){
|
||||
finish();
|
||||
}else {
|
||||
// MvpPre.topicId(zone_id, 2);
|
||||
}
|
||||
// finish();
|
||||
public void setLikeZone(int idx, CircleListBean item, int type) {
|
||||
MvpPre.getCircleDetail(idx, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCircleDetail(int idx, CircleListBean item, CircleListBean newItem) {
|
||||
List<CircleListBean> oldList = new ArrayList<>(cirleListAdapter.getData());
|
||||
circleList.set(idx, newItem);
|
||||
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CircleListDiffCallback(oldList, circleList), false);
|
||||
cirleListAdapter.setNewDiffData(diffResult, circleList);
|
||||
|
||||
EventBus.getDefault().post(new PlazaEvent(circleList.get(idx).id, PlazaEvent.MODIFY_ZONE));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(int index) {
|
||||
EventBus.getDefault().post(new PlazaEvent(circleList.get(index).id, PlazaEvent.DELETE_ZONE));
|
||||
finish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
List<CircleListBean> beanList = new ArrayList<>();
|
||||
beanList.add(bean);
|
||||
cirleListAdapter.setNewData(beanList);
|
||||
MvpPre.getCommentList(zone_id, "1", "10");
|
||||
circleList.add(bean);
|
||||
cirleListAdapter.setNewData(circleList);
|
||||
MvpPre.getCommentList(zone_id, "1", "30");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -268,14 +283,12 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
mBinding.tvNum.setText("全部评论(" + commentBean.getTotal() + ")");
|
||||
commentAdapter.updateData(commentBean.getList()); // 假设 CommentBean 包含评论列表
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void commentZone() {
|
||||
// MvpPre.getCommentList(zone_id, "1", "10");
|
||||
MvpPre.topicId(zone_id, 2);
|
||||
MvpPre.getCommentList(zone_id, "1", "30");
|
||||
MvpPre.getCircleDetail(0, circleList.get(0));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -283,6 +296,7 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onInputBoxShow(int id, String s, int position, String replyTo) {
|
||||
mBinding.etInput.requestFocus();
|
||||
@@ -309,9 +323,10 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
|
||||
@Override
|
||||
public void onDetaleClick(int id, int position) {
|
||||
deleteComment1(id,position);
|
||||
deleteComment1(id, position);
|
||||
// MvpPre.deleteComment(id+"");
|
||||
}
|
||||
|
||||
private void deleteComment1(int commentId, int position) {
|
||||
// 创建并显示确认对话框
|
||||
new ConfirmDialog(this,
|
||||
@@ -327,22 +342,22 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
},
|
||||
v -> {
|
||||
// 点击“取消”按钮时什么都不做
|
||||
},false,0).show();
|
||||
}, false, 0).show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCommentLongClick(CommentBean.CommentDetailsBean comment,CommentBean.CommentDetailsBean.Replies reply, int position) {
|
||||
String[] options ;
|
||||
if (comment.getUser_id() == SpUtil.getUserId()){
|
||||
options = new String[]{"复制", "删除", "回复", "取消"};
|
||||
}else {
|
||||
if (reply!=null) {
|
||||
public void onCommentLongClick(CommentBean.CommentDetailsBean comment, CommentBean.CommentDetailsBean.Replies reply, int position) {
|
||||
String[] options;
|
||||
if (comment.getUser_id() == SpUtil.getUserId()) {
|
||||
options = new String[]{"复制", "删除", "回复", "取消"};
|
||||
} else {
|
||||
if (reply != null) {
|
||||
if (reply.getUser_id() == SpUtil.getUserId()) {
|
||||
options = new String[]{"复制", "删除", "回复", "取消"};
|
||||
} else {
|
||||
options = new String[]{"复制", "回复", "取消"};
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
options = new String[]{"复制", "回复", "取消"};
|
||||
}
|
||||
}
|
||||
@@ -391,7 +406,7 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
textView.setBackgroundResource(com.xscm.moduleutil.R.drawable.bg_bottom_sheet_item);
|
||||
final int optionIndex = i;
|
||||
textView.setOnClickListener(v -> {
|
||||
handleOptionClick(optionIndex, comment,reply, position);
|
||||
handleOptionClick(optionIndex, comment, reply, position);
|
||||
bottomSheetDialog.dismiss();
|
||||
});
|
||||
|
||||
@@ -413,30 +428,31 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
bottomSheetDialog.setContentView(dialogView);
|
||||
bottomSheetDialog.show();
|
||||
}
|
||||
private void handleOptionClick(int optionIndex, CommentBean.CommentDetailsBean comment,CommentBean.CommentDetailsBean.Replies reply, int position) {
|
||||
if (comment.getUser_id() == SpUtil.getUserId()||reply!=null) {
|
||||
|
||||
private void handleOptionClick(int optionIndex, CommentBean.CommentDetailsBean comment, CommentBean.CommentDetailsBean.Replies reply, int position) {
|
||||
if (comment.getUser_id() == SpUtil.getUserId() || reply != null) {
|
||||
// 当前用户的评论选项
|
||||
switch (optionIndex) {
|
||||
case 0: // 复制
|
||||
if (reply!=null) {
|
||||
if (reply != null) {
|
||||
copyComment(reply.getContent());
|
||||
}else {
|
||||
} else {
|
||||
copyComment(comment.getContent());
|
||||
}
|
||||
break;
|
||||
case 1: // 删除
|
||||
if (reply!=null) {
|
||||
if (reply != null) {
|
||||
// deleteComment(reply.getId(), position);
|
||||
deleteComment1(reply.getId(), position);
|
||||
}else {
|
||||
} else {
|
||||
// deleteComment(comment.getId(), position);
|
||||
deleteComment1(comment.getId(), position);
|
||||
}
|
||||
break;
|
||||
case 2: // 回复
|
||||
if (reply!=null){
|
||||
onInputBoxShow(reply.getPid(), "", position, reply.getReply_to_user()+"");
|
||||
}else {
|
||||
if (reply != null) {
|
||||
onInputBoxShow(reply.getPid(), "", position, reply.getReply_to_user() + "");
|
||||
} else {
|
||||
onInputBoxShow(comment.getId(), "", position, "");
|
||||
}
|
||||
break;
|
||||
@@ -446,16 +462,16 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
// 其他用户的评论选项
|
||||
switch (optionIndex) {
|
||||
case 0: // 复制
|
||||
if (reply!=null) {
|
||||
if (reply != null) {
|
||||
copyComment(reply.getContent());
|
||||
}else {
|
||||
} else {
|
||||
copyComment(comment.getContent());
|
||||
}
|
||||
break;
|
||||
case 1: // 回复
|
||||
if (reply!=null){
|
||||
onInputBoxShow(reply.getPid(), "", position, reply.getReply_to_user()+"");
|
||||
}else {
|
||||
if (reply != null) {
|
||||
onInputBoxShow(reply.getPid(), "", position, reply.getReply_to_user() + "");
|
||||
} else {
|
||||
onInputBoxShow(comment.getId(), "", position, "");
|
||||
}
|
||||
break;
|
||||
@@ -463,6 +479,7 @@ public class DynamicDetailActivity extends BaseMvpActivity<CirclePresenter, Acti
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 具体操作方法
|
||||
private void copyComment(String content) {
|
||||
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE);
|
||||
|
||||
@@ -5,9 +5,11 @@ import android.text.SpannableString;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.LeadingMarginSpan;
|
||||
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.blankj.utilcode.util.ActivityUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.ActivityDynamicListBinding;
|
||||
import com.xscm.modulemain.activity.user.activity.UserHomepageActivity;
|
||||
@@ -15,42 +17,53 @@ import com.xscm.modulemain.activity.plaza.contacts.CircleContacts;
|
||||
import com.xscm.modulemain.activity.plaza.presenter.CirclePresenter;
|
||||
import com.xscm.modulemain.BaseMvpActivity;
|
||||
import com.xscm.modulemain.manager.RoomManager;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
import com.xscm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.CommentBean;
|
||||
import com.xscm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.xscm.moduleutil.bean.HeatedBean;
|
||||
import com.xscm.moduleutil.diff.CircleListDiffCallback;
|
||||
import com.xscm.moduleutil.event.GiftRewardEvent;
|
||||
import com.xscm.moduleutil.event.PlazaEvent;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ChatLauncher;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.xscm.modulemain.dialog.ShareDialog;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*@author qx
|
||||
*@data 2025/6/3
|
||||
*@description: 广场中顶部的热议点击进入的列表展示
|
||||
* @author qx
|
||||
* @data 2025/6/3
|
||||
* @description: 广场中顶部的热议点击进入的列表展示
|
||||
*/
|
||||
@Route(path = ARouteConstants.CIRCLE_LIST)
|
||||
public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, ActivityDynamicListBinding> implements CircleContacts.View {
|
||||
|
||||
private HeatedBean heatedBean;
|
||||
CirleListAdapter cirleListAdapter;
|
||||
private List<CircleListBean> circleList = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
heatedBean= getIntent().getParcelableExtra("heatedBean");
|
||||
heatedBean = getIntent().getParcelableExtra("heatedBean");
|
||||
mBinding.topBar.setTitle(heatedBean.getTitle());
|
||||
MvpPre.topicId(heatedBean.getTopic_id(),1);
|
||||
ImageUtils.loadHeadCC(heatedBean.getPic(),mBinding.ivAvatar);
|
||||
|
||||
MvpPre.topicId(heatedBean.getTopic_id(), 1);
|
||||
|
||||
|
||||
ImageUtils.loadHeadCC(heatedBean.getPic(), mBinding.ivAvatar);
|
||||
mBinding.tvTitle.setText(heatedBean.getTitle());
|
||||
mBinding.tvDescription.setText(heatedBean.getCount()+"条动态");
|
||||
SpannableString spannableString=new SpannableString(heatedBean.getContent());
|
||||
spannableString.setSpan(new LeadingMarginSpan.Standard(36),0,heatedBean.getContent().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
mBinding.tvDescription.setText(heatedBean.getCount() + "条动态");
|
||||
SpannableString spannableString = new SpannableString(heatedBean.getContent());
|
||||
spannableString.setSpan(new LeadingMarginSpan.Standard(36), 0, heatedBean.getContent().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
mBinding.tvContent.setText(spannableString);
|
||||
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
|
||||
@@ -58,40 +71,30 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
mBinding.recycleView.setAdapter(cirleListAdapter);
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId()+"");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
// cirleListAdapter.notifyItemChanged(position);
|
||||
cirleListAdapter.updateLikeStatusOnly(position, item.getIs_like());
|
||||
}
|
||||
public void onDianzanClick(int index, CircleListBean item) {
|
||||
MvpPre.likeZone(index, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(CircleListBean item) {
|
||||
// Toast.makeText(getApplicationContext(), "查看主页:" + item.getNickname(), Toast.LENGTH_SHORT).show();
|
||||
Intent intent = new Intent(DynamicListActivity.this, UserHomepageActivity.class);
|
||||
intent.putExtra("userId", item.getUser_id()+"");
|
||||
intent.putExtra("userId", item.getUser_id() + "");
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()),item.getUser_id()+"",position, getSupportFragmentManager());
|
||||
public void onZsClick(int position, CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), item.getUser_id() + "", position, getSupportFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
ShareDialog shareDialog= new ShareDialog(DynamicListActivity.this,item.getContent(),item.getShare_url(),item.getId()+"",3,item.getUser_id()+"",item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener(){
|
||||
public void onMoreClick(int idx, CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(DynamicListActivity.this, item.getContent(), item.getShare_url(), item.getId() + "", 3, item.getUser_id() + "", item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
MvpPre.deleteZone(idx, item);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
@@ -99,7 +102,6 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(CircleListBean item) {
|
||||
// CommentDialogFragment.show(String.valueOf(item.getId()), getSupportFragmentManager());
|
||||
Intent intent = new Intent(DynamicListActivity.this, DynamicDetailActivity.class);
|
||||
intent.putExtra("zone_id", item.getId() + "");
|
||||
startActivity(intent);
|
||||
@@ -112,12 +114,10 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
|
||||
@Override
|
||||
public void onGensui(CircleListBean item) {
|
||||
if (item.getRoom_id()!=null && !item.getRoom_id().equals("0")) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id(),"",null);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页热门列表").withString("roomId", item.getRoom_id()).navigation();
|
||||
}else {
|
||||
ChatLauncher.getInstance().launchC2CChat(DynamicListActivity.this, item.getUser_id()+"");
|
||||
if (item.getRoom_id() != null && !item.getRoom_id().equals("0")) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getApplicationContext(), item.getRoom_id(), "", null);
|
||||
} else {
|
||||
ChatLauncher.getInstance().launchC2CChat(DynamicListActivity.this, item.getUser_id() + "");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -139,8 +139,20 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
cirleListAdapter.setNewData(list);
|
||||
public void getCircleList(List<CircleListBean> list) {
|
||||
if (list == null || list.isEmpty())
|
||||
return;
|
||||
// if (page == 1){
|
||||
// circleList.clear();
|
||||
// }
|
||||
//
|
||||
// List<CircleListBean> oldList = new ArrayList<>(cirleListAdapter.getData());
|
||||
// circleList.addAll(list);
|
||||
//
|
||||
// DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CircleListDiffCallback(oldList, circleList), false);
|
||||
// cirleListAdapter.setNewDiffData(diffResult,circleList);
|
||||
circleList.addAll(list);
|
||||
cirleListAdapter.setNewData(circleList);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -149,9 +161,8 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone(int type) {
|
||||
// ToastUtils.show("成功");
|
||||
// MvpPre.topicId(heatedBean.getTopic_id(),1);
|
||||
public void setLikeZone(int index, CircleListBean item, int type) {
|
||||
MvpPre.getCircleDetail(index, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -176,11 +187,43 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEvent(GiftRewardEvent event) {
|
||||
MvpPre.topicId(event.getZone_id(), 2);
|
||||
// cirleListAdapter.notifyItemChanged(event.getPoints());
|
||||
public void onEvent(BaseEvent event) {
|
||||
if (event instanceof GiftRewardEvent) {
|
||||
MvpPre.getCircleDetail(((GiftRewardEvent) event).getPoints(),
|
||||
circleList.get(((GiftRewardEvent) event).getPoints()));
|
||||
if (ActivityUtils.getTopActivity() instanceof DynamicListActivity){
|
||||
EventBus.getDefault().post(new PlazaEvent(circleList.get(((GiftRewardEvent) event).getPoints()).id, PlazaEvent.MODIFY_ZONE));
|
||||
}
|
||||
} else if (event instanceof PlazaEvent) {
|
||||
CircleListBean item = null;
|
||||
int index = 0;
|
||||
for (int i = 0; i < circleList.size(); i++) {
|
||||
if (circleList.get(i).getId() == ((PlazaEvent) event).getMsgId()) {
|
||||
item = circleList.get(i);
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item == null || ActivityUtils.getTopActivity() instanceof DynamicListActivity)
|
||||
return;
|
||||
|
||||
switch (((PlazaEvent) event).getType()) {
|
||||
case PlazaEvent.MODIFY_ZONE:
|
||||
MvpPre.getCircleDetail(index, item);
|
||||
break;
|
||||
case PlazaEvent.DELETE_ZONE:
|
||||
circleList.remove(index);
|
||||
cirleListAdapter.notifyItemRemoved(index);
|
||||
if (index != 0) {
|
||||
cirleListAdapter.notifyItemRangeChanged(index, circleList.size() - index); // 修正后续索引
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
|
||||
@@ -195,4 +238,30 @@ public class DynamicListActivity extends BaseMvpActivity<CirclePresenter, Activi
|
||||
public void finishComment() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCircleDetail(int index, CircleListBean item, CircleListBean newItem) {
|
||||
if (ActivityUtils.getTopActivity() instanceof DynamicListActivity){
|
||||
EventBus.getDefault().post(new PlazaEvent(circleList.get(index).id, PlazaEvent.MODIFY_ZONE));
|
||||
}
|
||||
|
||||
List<CircleListBean> oldList = new ArrayList<>(cirleListAdapter.getData());
|
||||
circleList.set(index, newItem);
|
||||
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CircleListDiffCallback(oldList, circleList), false);
|
||||
cirleListAdapter.setNewDiffData(diffResult, circleList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(int index) {
|
||||
if (ActivityUtils.getTopActivity() instanceof DynamicListActivity){
|
||||
EventBus.getDefault().post(new PlazaEvent(circleList.get(index).id, PlazaEvent.DELETE_ZONE));
|
||||
}
|
||||
circleList.remove(index);
|
||||
cirleListAdapter.notifyItemRemoved(index);
|
||||
if (index != 0) {
|
||||
cirleListAdapter.notifyItemRangeChanged(index, circleList.size() - index); // 修正后续索引
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -345,6 +345,7 @@ public class ReleaseActivity extends BaseMvpActivity<ReleasePresenter, ActivityR
|
||||
public void publishSuccess() {
|
||||
mBinding.etG.setText( "立即发布");
|
||||
ToastUtils.showShort("发布成功");
|
||||
setResult(RESULT_OK);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,17 +18,21 @@ public class CircleContacts {
|
||||
|
||||
void setCategories(List<HeatedBean> list);
|
||||
|
||||
void setCircleList(List<CircleListBean> list);
|
||||
void getCircleList(List<CircleListBean> list);
|
||||
|
||||
void setExpandColumn(List<ExpandColumnBean> list);
|
||||
|
||||
void setLikeZone(int type);
|
||||
void setLikeZone(int index,CircleListBean item,int type);
|
||||
|
||||
void setCircleDetail(CircleListBean bean);
|
||||
|
||||
void getCommentList(CommentBean commentBean);
|
||||
void commentZone();
|
||||
void finishComment();
|
||||
|
||||
void getCircleDetail(int index,CircleListBean item,CircleListBean newItem);
|
||||
|
||||
void deleteZone(int index);
|
||||
}
|
||||
|
||||
public interface IIndexPre extends IPresenter {
|
||||
@@ -38,11 +42,13 @@ public class CircleContacts {
|
||||
|
||||
void getExpandColumn(String type,String page,String page_limit);//获取扩列数据
|
||||
|
||||
void likeZone(String zone_id);
|
||||
void likeZone(int index,CircleListBean item);
|
||||
|
||||
void getCircleDetail(int index,CircleListBean item);
|
||||
|
||||
void topicId(String topic_id,int type);//type:这是让区分是什么地方获得数据,type=1:动态列表,type=2:动态详情
|
||||
|
||||
void deleteZone(String zone_id);
|
||||
void deleteZone(int index,CircleListBean item);
|
||||
|
||||
void getCommentList(String id,String page,String page_limit);
|
||||
void commentZone(String id,String content,String pid,String reply_to);
|
||||
|
||||
@@ -2,23 +2,25 @@ package com.xscm.modulemain.activity.plaza.fragment;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.DiffUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.adapter.CirleCategoryBannerAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentCircleCategoryBinding;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.listener.OnRefreshLoadMoreListener;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.main.activity.MainActivity;
|
||||
import com.xscm.modulemain.activity.plaza.activity.DynamicListActivity;
|
||||
import com.xscm.modulemain.activity.plaza.contacts.CircleContacts;
|
||||
import com.xscm.modulemain.activity.plaza.presenter.CirclePresenter;
|
||||
import com.xscm.modulemain.adapter.CirleCategoryBannerAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentCircleCategoryBinding;
|
||||
import com.xscm.modulemain.dialog.ShareDialog;
|
||||
import com.xscm.modulemain.manager.RoomManager;
|
||||
import com.xscm.moduleutil.BaseEvent;
|
||||
import com.xscm.moduleutil.adapter.CirleListAdapter;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.BaseListData;
|
||||
@@ -26,16 +28,16 @@ import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.CommentBean;
|
||||
import com.xscm.moduleutil.bean.ExpandColumnBean;
|
||||
import com.xscm.moduleutil.bean.HeatedBean;
|
||||
import com.xscm.moduleutil.diff.CircleListDiffCallback;
|
||||
import com.xscm.moduleutil.event.GiftRewardEvent;
|
||||
import com.xscm.moduleutil.event.PlazaEvent;
|
||||
import com.xscm.moduleutil.utils.ARouteConstants;
|
||||
import com.xscm.moduleutil.utils.ChatLauncher;
|
||||
import com.xscm.moduleutil.widget.dialog.RewardGiftDialogFragment;
|
||||
import com.xscm.modulemain.dialog.ShareDialog;
|
||||
import com.zhpan.bannerview.indicator.DrawableIndicator;
|
||||
import com.zhpan.indicator.base.IIndicator;
|
||||
import com.zhpan.indicator.enums.IndicatorSlideMode;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
import org.greenrobot.eventbus.ThreadMode;
|
||||
|
||||
@@ -48,29 +50,22 @@ import java.util.List;
|
||||
public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleCategoryBinding> implements CircleContacts.View {
|
||||
CirleCategoryBannerAdapter cirleCategoryBannerAdapter;
|
||||
CirleListAdapter cirleListAdapter;
|
||||
private int page;
|
||||
private int page = 1;
|
||||
private String pageLimit = "10";
|
||||
|
||||
private List<CircleListBean> circleList = new ArrayList<>();
|
||||
|
||||
public static CircleCategoryFragment newInstance() {
|
||||
return new CircleCategoryFragment();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
page=1;
|
||||
MvpPre.getCategories();
|
||||
MvpPre.getCircleList("1", "10");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initData() {
|
||||
// MvpPre.getCategories();
|
||||
page = 1;
|
||||
MvpPre.getCategories();
|
||||
MvpPre.getCircleList("1", pageLimit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
@Override
|
||||
@@ -85,14 +80,11 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
.setIndicatorSlideMode(IndicatorSlideMode.NORMAL)
|
||||
.setAdapter(cirleCategoryBannerAdapter)
|
||||
.setAutoPlay(false);
|
||||
// .create();/**/
|
||||
|
||||
mBinding.constraintLayout.setVisibility(View.GONE);
|
||||
cirleCategoryBannerAdapter.setOnItemClickListener((view, data, position) -> {
|
||||
// 示例:跳转到房间详情页
|
||||
if (data != null) {
|
||||
// ARouter.getInstance().build(ARouteConstants.DYNAMIC_LIST)
|
||||
// .withString("id", data.getId()).navigation();
|
||||
Intent intent = new Intent(getActivity(), DynamicListActivity.class);
|
||||
intent.putExtra("heatedBean", data);
|
||||
startActivity(intent);
|
||||
@@ -101,44 +93,33 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
|
||||
mBinding.recycleView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||
|
||||
cirleListAdapter = new CirleListAdapter(CirleListAdapter.PAGE_HOME);
|
||||
mBinding.recycleView.setAdapter(cirleListAdapter);
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
MvpPre.likeZone(item.getId() + "");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
// 局部刷新
|
||||
cirleListAdapter.updateLikeStatusOnly(position, item.getIs_like());
|
||||
}
|
||||
public void onDianzanClick(int position, CircleListBean item) {
|
||||
MvpPre.likeZone(position, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHeadImageClick(CircleListBean item) {
|
||||
ARouter.getInstance().build(ARouteConstants.USER_HOME_PAGE).withString("userId", item.getUser_id() + "").navigation();
|
||||
// Intent intent = new Intent(getActivity(), UserHomepageActivity.class);
|
||||
// intent.putExtra("userId", item.getUser_id()+"");
|
||||
// startActivity(intent);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {//打赏
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()),item.getUser_id()+"",position, getChildFragmentManager());
|
||||
public void onZsClick(int position, CircleListBean item) {//打赏
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()), item.getUser_id() + "", position, getChildFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {//点击点点,分享等
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getId()+"",3,item.getUser_id()+"",item);
|
||||
public void onMoreClick(int idx, CircleListBean item) {//点击点点,分享等
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(), item.getShare_url(), item.getId() + "", 3, item.getUser_id() + "", item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
MvpPre.deleteZone(idx, item);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
@@ -146,11 +127,7 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void onPinglunClick(CircleListBean item) {
|
||||
ARouter.getInstance().build(ARouteConstants.DYNAMIC_DETAIL).withString("zone_id", item.getId()+"").navigation();
|
||||
// Intent intent = new Intent(getActivity(), DynamicDetailActivity.class);
|
||||
// intent.putExtra("zone_id", item.getId() + "");
|
||||
// startActivity(intent);
|
||||
|
||||
ARouter.getInstance().build(ARouteConstants.DYNAMIC_DETAIL).withString("zone_id", item.getId() + "").navigation();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,12 +137,13 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
|
||||
@Override
|
||||
public void onGensui(CircleListBean item) {
|
||||
if (item.getRoom_id()!=null && !item.getRoom_id().equals("0")) {
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), item.getRoom_id(),"",null);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页热门列表").withString("roomId", item.getRoom_id()).navigation();
|
||||
}else {
|
||||
ChatLauncher.getInstance().launchC2CChat(getActivity(), item.getUser_id()+"");
|
||||
if (item.getRoom_id() != null && !item.getRoom_id().equals("0")) {
|
||||
if (getActivity() instanceof MainActivity) {
|
||||
((MainActivity) getActivity()).isShowLoading(true);
|
||||
}
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), item.getRoom_id(), "", null);
|
||||
} else {
|
||||
ChatLauncher.getInstance().launchC2CChat(getActivity(), item.getUser_id() + "");
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -173,22 +151,59 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
@Override
|
||||
public void onLoadMore(@NonNull RefreshLayout refreshLayout) {
|
||||
page++;
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
MvpPre.getCircleList(page + "", pageLimit);
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void onRefresh(@NonNull RefreshLayout refreshLayout) {
|
||||
page = 1;
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
circleList.clear();
|
||||
cirleListAdapter.notifyDataSetChanged();
|
||||
MvpPre.getCircleList(page + "", pageLimit);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onEvent(GiftRewardEvent event) {
|
||||
MvpPre.topicId(event.getZone_id(), 2);
|
||||
public void onEvent(BaseEvent event) {
|
||||
if (event instanceof GiftRewardEvent) {
|
||||
MvpPre.getCircleDetail(((GiftRewardEvent) event).getPoints(),
|
||||
circleList.get(((GiftRewardEvent) event).getPoints()));
|
||||
} else if (event instanceof PlazaEvent) {
|
||||
CircleListBean item = null;
|
||||
int index = 0;
|
||||
for (int i = 0; i < circleList.size(); i++) {
|
||||
if (circleList.get(i).getId() == ((PlazaEvent) event).getMsgId()) {
|
||||
item = circleList.get(i);
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item == null)
|
||||
return;
|
||||
switch (((PlazaEvent) event).getType()) {
|
||||
case PlazaEvent.MODIFY_ZONE:
|
||||
MvpPre.getCircleDetail(index, item);
|
||||
break;
|
||||
case PlazaEvent.DELETE_ZONE:
|
||||
if (circleList.size() == 1) {
|
||||
circleList.clear();
|
||||
cirleListAdapter.notifyDataSetChanged();
|
||||
} else {
|
||||
circleList.remove(index);
|
||||
cirleListAdapter.notifyItemRemoved(index);
|
||||
cirleListAdapter.notifyItemRangeChanged(index, circleList.size() - index); // 修正后续索引
|
||||
}
|
||||
MvpPre.getCategories();
|
||||
break;
|
||||
case PlazaEvent.ADD_ZONE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IIndicator getVectorDrawableIndicator() {
|
||||
int dp6 = getResources().getDimensionPixelOffset(com.xscm.moduleutil.R.dimen.dp_6);
|
||||
return new DrawableIndicator(getContext())
|
||||
@@ -212,43 +227,58 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
return new CirclePresenter(this, getContext());
|
||||
}
|
||||
|
||||
|
||||
public void newAddRefresh() {
|
||||
page = 1;
|
||||
circleList.clear();
|
||||
MvpPre.getCircleList(page + "", pageLimit);
|
||||
MvpPre.getCategories();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCategories(List<HeatedBean> list) {
|
||||
// 将原始数据拆分为多个子列表,每个子列表最多包含4个元素
|
||||
mBinding.constraintLayout.setVisibility(View.VISIBLE);
|
||||
// 添加到 bannerViewPager 的是分页后的列表
|
||||
mBinding.bannerViewPager.create(baseListData(list, 4));
|
||||
// mBinding.bannerViewPager.addData(baseListData(list, 4));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
public void getCircleList(List<CircleListBean> list) {
|
||||
if (list == null || list.isEmpty())
|
||||
return;
|
||||
if (page == 1) {
|
||||
cirleListAdapter.setNewData(new ArrayList<>());
|
||||
cirleListAdapter.setNewData(list);
|
||||
}else {
|
||||
if (list!=null && list.size() > 0){
|
||||
cirleListAdapter.addData(list);
|
||||
}
|
||||
circleList.addAll(list);
|
||||
cirleListAdapter.setNewData(circleList);
|
||||
} else {
|
||||
List<CircleListBean> oldList = new ArrayList<>(cirleListAdapter.getData());
|
||||
circleList.addAll(list);
|
||||
|
||||
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CircleListDiffCallback(oldList, circleList), false);
|
||||
cirleListAdapter.setNewDiffData(diffResult, circleList);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setExpandColumn(List<ExpandColumnBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone(int type) {
|
||||
if (type == 1) {
|
||||
MvpPre.getCircleList(page + "", "10");
|
||||
}
|
||||
public void setLikeZone(int index, CircleListBean item, int type) {
|
||||
MvpPre.getCircleDetail(index, item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCircleDetail(int index, CircleListBean item, CircleListBean newItem) {
|
||||
List<CircleListBean> oldList = new ArrayList<>(cirleListAdapter.getData());
|
||||
circleList.set(index, newItem);
|
||||
DiffUtil.DiffResult diffResult = DiffUtil.calculateDiff(new CircleListDiffCallback(oldList, circleList), false);
|
||||
cirleListAdapter.setNewDiffData(diffResult, circleList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleDetail(CircleListBean bean) {
|
||||
|
||||
// 更新列表中的单个数据项(仅更新特定字段)
|
||||
if (cirleListAdapter != null && bean != null) {
|
||||
List<CircleListBean> dataList = cirleListAdapter.getData();
|
||||
@@ -270,6 +300,21 @@ public class CircleCategoryFragment extends BaseMvpFragment<CirclePresenter, Fra
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NotifyDataSetChanged")
|
||||
@Override
|
||||
public void deleteZone(int index) {
|
||||
if (circleList.size() == 1) {
|
||||
circleList.clear();
|
||||
cirleListAdapter.notifyDataSetChanged();
|
||||
} else {
|
||||
circleList.remove(index);
|
||||
cirleListAdapter.notifyItemRemoved(index);
|
||||
cirleListAdapter.notifyItemRangeChanged(index, circleList.size() - index); // 修正后续索引
|
||||
}
|
||||
|
||||
MvpPre.getCategories();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCommentList(CommentBean commentBean) {
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.xscm.modulemain.activity.plaza.fragment;
|
||||
|
||||
|
||||
import android.content.Intent;
|
||||
import android.util.SparseArray;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -10,10 +11,10 @@ import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.databinding.FragmentCircleBinding;
|
||||
import com.xscm.modulemain.activity.plaza.activity.ReleaseActivity;
|
||||
import com.xscm.modulemain.activity.plaza.contacts.CircleContacts;
|
||||
import com.xscm.modulemain.activity.plaza.presenter.CirclePresenter;
|
||||
import com.xscm.modulemain.databinding.FragmentCircleBinding;
|
||||
import com.xscm.moduleutil.base.BaseMvpFragment;
|
||||
import com.xscm.moduleutil.bean.CircleListBean;
|
||||
import com.xscm.moduleutil.bean.CommentBean;
|
||||
@@ -30,6 +31,10 @@ import java.util.List;
|
||||
*/
|
||||
public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCircleBinding> implements CircleContacts.View {
|
||||
private List<MyBagBean> list;
|
||||
|
||||
public static final int RELEASE_CODE = 1010;
|
||||
private MyFragmentPagerAdapter adapter;
|
||||
|
||||
public static CircleFragment newInstance () {
|
||||
return new CircleFragment();
|
||||
}
|
||||
@@ -39,24 +44,31 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
list=new ArrayList<>();
|
||||
list.add(new MyBagBean("发现", "1"));
|
||||
list.add(new MyBagBean("扩列", "2"));
|
||||
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), list));
|
||||
adapter = new MyFragmentPagerAdapter(getChildFragmentManager(), list);
|
||||
mBinding.viewPager.setAdapter(adapter);
|
||||
mBinding.tabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.tabLayout.setCurrentTab(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initView () {
|
||||
|
||||
mBinding.ivRelease.setOnClickListener(this::onClick);
|
||||
}
|
||||
|
||||
private void onClick(View view) {
|
||||
if (view.getId()==R.id.iv_release){//发布
|
||||
startActivity(new Intent(getContext(), ReleaseActivity.class));
|
||||
startActivityForResult(new Intent(getContext(), ReleaseActivity.class),RELEASE_CODE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (requestCode==RELEASE_CODE){
|
||||
adapter.refreshCircleCategoryData();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initListener () {
|
||||
super.initListener();
|
||||
@@ -79,7 +91,7 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
public void getCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@@ -89,7 +101,17 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone(int type) {
|
||||
public void setLikeZone(int idx,CircleListBean item,int type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCircleDetail(int idx,CircleListBean item, CircleListBean newItem) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(int index) {
|
||||
|
||||
}
|
||||
|
||||
@@ -116,7 +138,7 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
private static class MyFragmentPagerAdapter extends FragmentStatePagerAdapter {
|
||||
|
||||
private List<MyBagBean> list;
|
||||
|
||||
private SparseArray<Fragment> fragments = new SparseArray<>();
|
||||
|
||||
public MyFragmentPagerAdapter(FragmentManager fm, List<MyBagBean> list) {
|
||||
super(fm);
|
||||
@@ -126,11 +148,17 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
@Override
|
||||
public Fragment getItem(int position) {
|
||||
MyBagBean model = list.get(position);
|
||||
if ("1".equals(model.getMyBagType())){
|
||||
return CircleCategoryFragment.newInstance();
|
||||
}else {
|
||||
return ExpandColumnFragment.newInstance();
|
||||
Fragment fragment = fragments.get(position);
|
||||
if (fragment == null) {
|
||||
if (model.getMyBagType().equals("1")) {
|
||||
fragment = CircleCategoryFragment.newInstance();
|
||||
} else {
|
||||
fragment = ExpandColumnFragment.newInstance();
|
||||
}
|
||||
fragments.put(position, fragment);
|
||||
}
|
||||
|
||||
return fragment;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -138,6 +166,12 @@ public class CircleFragment extends BaseMvpFragment<CirclePresenter, FragmentCir
|
||||
return list.size();
|
||||
}
|
||||
|
||||
public void refreshCircleCategoryData() {
|
||||
CircleCategoryFragment circleCategoryFragments = (CircleCategoryFragment) fragments.get(0);
|
||||
circleCategoryFragments.newAddRefresh();
|
||||
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public CharSequence getPageTitle(int position) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.modulemain.R;
|
||||
import com.xscm.modulemain.activity.main.activity.MainActivity;
|
||||
import com.xscm.modulemain.adapter.ExpandColumnAdapter;
|
||||
import com.xscm.modulemain.databinding.FragmentExpandColumnBinding;
|
||||
import com.scwang.smartrefresh.layout.api.RefreshLayout;
|
||||
@@ -131,9 +132,10 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
@Override
|
||||
public void onGnsClick(ExpandColumnBean item) {
|
||||
if ( item.getRoom_id()!=0){
|
||||
if (getActivity() instanceof MainActivity){
|
||||
((MainActivity)getActivity()).isShowLoading(true);
|
||||
}
|
||||
RoomManager.getInstance().fetchRoomDataAndEnter(getActivity(), item.getRoom_id()+"","",null);
|
||||
|
||||
// ARouter.getInstance().build(ARouteConstants.ROOM_DETAILS).withString("form", "首页热门列表").withString("roomId", item.getRoom_id()+"").navigation();
|
||||
}else {
|
||||
ChatLauncher.getInstance().launchC2CChat(getActivity(), item.getUser_id()+"");
|
||||
}
|
||||
@@ -162,7 +164,7 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCircleList(List<CircleListBean> list) {
|
||||
public void getCircleList(List<CircleListBean> list) {
|
||||
|
||||
}
|
||||
|
||||
@@ -200,7 +202,17 @@ public class ExpandColumnFragment extends BaseMvpFragment<CirclePresenter, Fragm
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLikeZone(int type) {
|
||||
public void setLikeZone(int idx,CircleListBean item,int type) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getCircleDetail(int idx,CircleListBean item, CircleListBean newItem) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(int index) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
|
||||
@Override
|
||||
public void getCircleList(String page, String page_limit) {
|
||||
|
||||
api.getCircleList(page,page_limit,new BaseObserver<List<CircleListBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
@@ -58,7 +57,7 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setCircleList(circleListBeans);
|
||||
MvpRef.get().getCircleList(circleListBeans);
|
||||
MvpRef.get().finishComment();
|
||||
}
|
||||
});
|
||||
@@ -83,30 +82,11 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// List<String> images=new ArrayList<>();
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// images.add("https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=false&word=%E7%BE%8E%E5%A5%B3%E5%9B%BE%E7%89%87&hs=0&pn=0&spn=0&di=7490230549689139201&pi=0&rn=1&tn=baiduimagedetail&is=2160705940%2C3901940110&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=2056927850%2C430353020&os=2160705940%2C3901940110&simid=3513174432%2C352671812&adpicid=0&lpn=0&ln=0&fm=&sme=&cg=girl&bdtype=0&oriquery=&objurl=https%3A%2F%2Fq4.itc.cn%2Fimages01%2F20240627%2Fd30dbf39840a4c0bbeb277a6d773db2f.jpeg&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3Bf5i7_z%26e3Bv54AzdH3FwAzdH3F0blaabmca_8d8n8lbaa&gsm=&islist=&querylist=");
|
||||
// List<ExpandColumnBean> expandColumnBeans=new ArrayList<>();
|
||||
// for (int i = 0; i < 10; i++){
|
||||
// ExpandColumnBean bean=new ExpandColumnBean();
|
||||
// bean.setId(""+i);
|
||||
// bean.setSex(i % 2 == 0 ? "2" : "1");
|
||||
// bean.setNickname("萌新驾到"+i);
|
||||
// bean.setAvatar("");
|
||||
// bean.setBirthday("2023-05-05");
|
||||
// bean.setLoginip("西安市");
|
||||
// bean.setHome_bgimages(images);
|
||||
// expandColumnBeans.add(bean);
|
||||
// }
|
||||
// MvpRef.get().setExpandColumn(expandColumnBeans);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void likeZone(String zone_id) {
|
||||
api.likeZone(zone_id, new BaseObserver<String>() {
|
||||
public void likeZone(int index,CircleListBean item) {
|
||||
api.likeZone(item.getId()+"", new BaseObserver<String>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
@@ -117,7 +97,26 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setLikeZone(2);
|
||||
MvpRef.get().setLikeZone(index,item,2);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getCircleDetail(int index,CircleListBean item) {
|
||||
api.zoneDetail(item.getId()+"", new BaseObserver<CircleListBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
addDisposable(d);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(CircleListBean circleListBeans) {
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().getCircleDetail(index,item,circleListBeans);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -136,7 +135,7 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setCircleList(circleListBeans);
|
||||
MvpRef.get().getCircleList(circleListBeans);
|
||||
}
|
||||
});
|
||||
}else if (type == 2){//这是获取动态详情
|
||||
@@ -158,8 +157,8 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(String zone_id) {
|
||||
api.deleteZone(zone_id, new BaseObserver<String>() {
|
||||
public void deleteZone(int index,CircleListBean bean) {
|
||||
api.deleteZone(bean.getId()+"", new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
@@ -171,7 +170,7 @@ public class CirclePresenter extends BasePresenter<CircleContacts.View> implemen
|
||||
if (MvpRef==null){
|
||||
MvpRef=new WeakReference<>(mView);
|
||||
}
|
||||
MvpRef.get().setLikeZone(1);
|
||||
MvpRef.get().deleteZone(index);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -71,9 +71,6 @@ public class VoiceFragment extends BaseMvpFragment<VoicePresenter, FragmentVoice
|
||||
ARouter.getInstance().build(ARouteConstants.MY_ROOM).withFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT).navigation();
|
||||
});
|
||||
|
||||
// mBinding.ivRoom2.setOnClickListener(v -> {
|
||||
//// ARouter.getInstance().build(ARouteConstants.INDEX_RANKING_LIST).navigation();
|
||||
// });
|
||||
|
||||
mBinding.ivRoom3.setOnClickListener(v -> {
|
||||
Intent intent = new Intent(getContext(), SearchActivity.class);
|
||||
@@ -88,37 +85,6 @@ public class VoiceFragment extends BaseMvpFragment<VoicePresenter, FragmentVoice
|
||||
showYouthModelDialog();
|
||||
}
|
||||
|
||||
|
||||
// InviteDialog inviteDialog=new InviteDialog(getContext());
|
||||
// inviteDialog.show();
|
||||
// inviteDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
// @Override
|
||||
// public void onDismiss(DialogInterface dialog) {
|
||||
// //邀请弹窗关闭后,弹首充
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// HeavenGiftDialog heavenGiftDialog=new HeavenGiftDialog(getContext());
|
||||
// heavenGiftDialog.show();
|
||||
// heavenGiftDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
// @Override
|
||||
// public void onDismiss(DialogInterface dialog) {
|
||||
// //首充弹窗关闭后,弹首充
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// FirstChargeDialog firstChargeDialog=new FirstChargeDialog(getContext());
|
||||
// firstChargeDialog.show();
|
||||
// firstChargeDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
// @Override
|
||||
// public void onDismiss(DialogInterface dialog) {
|
||||
// //首充弹窗关闭后,弹首充
|
||||
// dialog.dismiss();
|
||||
// }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
private boolean shouldShowYouthModelDialog() {
|
||||
|
||||
@@ -26,6 +26,6 @@ public class UserHomepageConacts {
|
||||
void getCircleList(String user_id,String page,String page_limit);
|
||||
|
||||
void userGuanz(String userId,String type);
|
||||
void deleteZone(String zone_id);
|
||||
void deleteZone(int idx,String zone_id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,9 +79,8 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
|
||||
cirleListAdapter.setOnItemClickListener(new CirleListAdapter.OnItemClickListener() {
|
||||
@Override
|
||||
public void onDianzanClick(CircleListBean item) {
|
||||
public void onDianzanClick(int position,CircleListBean item) {
|
||||
// MvpPre.likeZone(item.getId() + "");
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
if (position != -1) {
|
||||
// 更新点赞状态
|
||||
item.setIs_like(item.getIs_like() == 1 ? 0 : 1);
|
||||
@@ -97,19 +96,17 @@ public class CirleListFragment extends BaseMvpFragment<UserHomepagePresenter, Fr
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onZsClick(CircleListBean item) {
|
||||
int position = cirleListAdapter.getData().indexOf(item);
|
||||
public void onZsClick(int position,CircleListBean item) {
|
||||
RewardGiftDialogFragment.show(String.valueOf(item.getId()),item.getUser_id()+"",position, getChildFragmentManager());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDiandianClick(CircleListBean item) {
|
||||
public void onMoreClick(int idx,CircleListBean item) {
|
||||
ShareDialog shareDialog = new ShareDialog(getContext(), item.getContent(),item.getShare_url(),item.getId()+"",1,item.getUser_id()+"", item);
|
||||
shareDialog.setOnShareDataListener(new ShareDialog.OnShareDataListener() {
|
||||
|
||||
@Override
|
||||
public void onShareDataLoaded(String id) {
|
||||
MvpPre.deleteZone(id);
|
||||
MvpPre.deleteZone(idx,id);
|
||||
}
|
||||
});
|
||||
shareDialog.show();
|
||||
|
||||
@@ -76,7 +76,7 @@ public class UserHomepagePresenter extends BasePresenter<UserHomepageConacts.Vie
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteZone(String zone_id) {
|
||||
public void deleteZone(int idx,String zone_id) {
|
||||
api.deleteZone(zone_id, new BaseObserver<String>() {
|
||||
|
||||
@Override
|
||||
|
||||
20
modulemain/src/main/res/drawable/tab_indicator.xml
Normal file
20
modulemain/src/main/res/drawable/tab_indicator.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 用item标签限制整体尺寸:maxWidth=100dp,height=10dp(与tabIndicatorHeight一致) -->
|
||||
<item
|
||||
android:height="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:maxWidth="@dimen/dp_40">
|
||||
<!-- 最大宽度(根据需求调整) -->
|
||||
<!-- 固定高度(与tabIndicatorHeight匹配) -->
|
||||
<!-- 图片在item内居中 -->
|
||||
<!-- 嵌套bitmap设置图片资源和缩放模式 -->
|
||||
<bitmap
|
||||
android:dither="true"
|
||||
android:scaleType="fitCenter"
|
||||
android:src="@mipmap/tab_x" />
|
||||
<!-- 你的图片资源 -->
|
||||
<!-- 等比例缩放,确保图片在maxWidth和height内完整显示 -->
|
||||
<!-- 抗锯齿优化 -->
|
||||
</item>
|
||||
</layer-list>
|
||||
@@ -51,7 +51,7 @@
|
||||
android:layout_margin="@dimen/dp_16"
|
||||
android:layout_marginTop="@dimen/dp_12"
|
||||
android:gravity="center|left"
|
||||
android:text="全部评论(56)"
|
||||
android:text="全部评论(0)"
|
||||
android:textColor="@color/color_FF333333"
|
||||
android:textSize="@dimen/sp_16"
|
||||
android:textStyle="bold" />
|
||||
@@ -107,8 +107,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_send"
|
||||
android:layout_width="@dimen/dp_79"
|
||||
android:layout_height="@dimen/dp_31"
|
||||
android:layout_width="@dimen/dp_80"
|
||||
android:layout_height="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
android:background="@drawable/cs"
|
||||
android:gravity="center"
|
||||
|
||||
@@ -1,264 +1,263 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.main.activity.MainActivity">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
tools:context=".activity.main.activity.MainActivity">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
>
|
||||
android:layout_above="@+id/fly_bottom_btn"
|
||||
android:clipChildren="false" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/frame_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:clipChildren="false"/>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/transparent"
|
||||
android:clipChildren="false"
|
||||
>
|
||||
android:id="@+id/fly_bottom_btn"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:background="@color/transparent"
|
||||
android:clipChildren="false">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_bottom_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/ll_bottom_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/home_bbar_yuan"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_media"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/home_bbar_yuan"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_media"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_sy"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_media"/>
|
||||
android:id="@+id/im_sy"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_media" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_media"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab1"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10"/>
|
||||
android:id="@+id/tv_media"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab1"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_trend"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:id="@+id/rl_trend"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_trend"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_tend"/>
|
||||
android:id="@+id/im_trend"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_tend" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_trend"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab2"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10"/>
|
||||
android:id="@+id/tv_trend"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab2"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_news"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:id="@+id/rl_news"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RelativeLayout
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-3dp">
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="-3dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_news"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_news"/>
|
||||
android:id="@+id/iv_news"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="3dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_news" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_toRightOf="@+id/iv_news"
|
||||
android:background="@drawable/ease_bg_msg_count"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:paddingTop="1.5dp"
|
||||
android:paddingRight="@dimen/dp_5"
|
||||
android:paddingBottom="2dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:visibility="gone"
|
||||
tools:text="99+"
|
||||
tools:visibility="visible"/>
|
||||
android:id="@+id/tv_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_toRightOf="@+id/iv_news"
|
||||
android:background="@drawable/ease_bg_msg_count"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="@dimen/dp_5"
|
||||
android:paddingTop="1.5dp"
|
||||
android:paddingRight="@dimen/dp_5"
|
||||
android:paddingBottom="2dp"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
android:visibility="gone"
|
||||
tools:text="99+"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_news"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_news"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab3"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10"/>
|
||||
android:id="@+id/tv_news"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/iv_news"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab3"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/rl_me"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
android:id="@+id/rl_me"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/im_me"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_me"/>
|
||||
android:id="@+id/im_me"
|
||||
android:layout_width="@dimen/dp_24"
|
||||
android:layout_height="@dimen/dp_24"
|
||||
android:layout_centerInParent="true"
|
||||
android:gravity="center_horizontal"
|
||||
android:scaleType="fitXY"
|
||||
android:src="@drawable/main_bottom_bar_icon_me" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_me"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab4"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10"/>
|
||||
android:id="@+id/tv_me"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/main_tab4"
|
||||
android:textColor="@drawable/text_color_two"
|
||||
android:textSize="@dimen/sp_10" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<com.xscm.moduleutil.widget.DropView
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
android:id="@+id/ll"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_52"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.xscm.moduleutil.widget.GifAvatarOvalView
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/dp_4"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:gav_border_color="#FFF"
|
||||
app:gav_border_width="@dimen/dp_2"
|
||||
app:riv_border_color="#FFF"
|
||||
app:riv_border_width="@dimen/dp_2"
|
||||
app:riv_oval="true"/>
|
||||
android:id="@+id/riv"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_margin="@dimen/dp_4"
|
||||
android:src="@mipmap/default_avatar"
|
||||
app:gav_border_color="#FFF"
|
||||
app:gav_border_width="@dimen/dp_2"
|
||||
app:riv_border_color="#FFF"
|
||||
app:riv_border_width="@dimen/dp_2"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
android:layout_marginRight="@dimen/dp_7"
|
||||
android:background="#FFFFFFFF"
|
||||
android:visibility="visible"/>
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="@dimen/dp_7"
|
||||
android:layout_marginRight="@dimen/dp_7"
|
||||
android:background="#FFFFFFFF"
|
||||
android:visibility="visible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_guanbi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:src="@mipmap/icon_guanbi"/>
|
||||
android:id="@+id/iv_guanbi"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="@dimen/dp_14"
|
||||
android:src="@mipmap/icon_guanbi" />
|
||||
</com.xscm.moduleutil.widget.DropView>
|
||||
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_shouchl"-->
|
||||
<!-- android:layout_width="@dimen/dp_57"-->
|
||||
<!-- android:layout_height="@dimen/dp_57"-->
|
||||
<!-- android:layout_alignParentBottom="true"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_100"-->
|
||||
<!-- android:src="@mipmap/shouchl"/>-->
|
||||
<!-- <ImageView-->
|
||||
<!-- android:id="@+id/iv_shouchl"-->
|
||||
<!-- android:layout_width="@dimen/dp_57"-->
|
||||
<!-- android:layout_height="@dimen/dp_57"-->
|
||||
<!-- android:layout_alignParentBottom="true"-->
|
||||
<!-- android:layout_alignParentEnd="true"-->
|
||||
<!-- android:layout_marginEnd="@dimen/dp_20"-->
|
||||
<!-- android:layout_marginBottom="@dimen/dp_100"-->
|
||||
<!-- android:src="@mipmap/shouchl"/>-->
|
||||
|
||||
<com.stx.xhb.xbanner.XBanner
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="@dimen/dp_75"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
android:scaleType="fitCenter"
|
||||
app:AutoPlayTime="3000"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
app:pageChangeDuration="3000"
|
||||
app:pointContainerPosition="BOTTOM"
|
||||
app:pointNormal="@mipmap/room_ic_banner_point_normal"
|
||||
app:pointSelect="@mipmap/room_ic_banner_point_select"
|
||||
app:pointTopBottomPadding="@dimen/dp_2"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
app:pointsPosition="CENTER"
|
||||
app:pointsVisibility="true"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
/>
|
||||
android:id="@+id/banner"
|
||||
android:layout_width="@dimen/dp_75"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginEnd="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_100"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:scaleType="fitCenter"
|
||||
app:AutoPlayTime="3000"
|
||||
app:pageChangeDuration="3000"
|
||||
app:pointContainerPosition="BOTTOM"
|
||||
app:pointNormal="@mipmap/room_ic_banner_point_normal"
|
||||
app:pointSelect="@mipmap/room_ic_banner_point_select"
|
||||
app:pointTopBottomPadding="@dimen/dp_2"
|
||||
app:pointsPosition="CENTER"
|
||||
app:pointsVisibility="true" />
|
||||
|
||||
<app.dinus.com.loadingdrawable.LoadingView
|
||||
android:id="@+id/cool_wait_view"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_centerInParent="true"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/ps_ic_shadow_bg"
|
||||
app:loading_renderer="CoolWaitLoadingRenderer"/>
|
||||
android:id="@+id/cool_wait_view"
|
||||
android:layout_width="@dimen/dp_100"
|
||||
android:layout_height="@dimen/dp_100"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/ps_ic_shadow_bg"
|
||||
android:visibility="gone"
|
||||
app:loading_renderer="CoolWaitLoadingRenderer" />
|
||||
</RelativeLayout>
|
||||
|
||||
</layout>
|
||||
@@ -11,14 +11,13 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@mipmap/ranking_bj"
|
||||
>
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.xscm.moduleutil.widget.CustomTopBar
|
||||
android:id="@+id/top_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
/>
|
||||
android:layout_height="wrap_content" />
|
||||
|
||||
<com.google.android.material.tabs.TabLayout
|
||||
android:id="@+id/tabs"
|
||||
@@ -27,46 +26,22 @@
|
||||
android:layout_marginLeft="@dimen/dp_10"
|
||||
android:layout_marginTop="@dimen/dp_5"
|
||||
android:layout_marginRight="@dimen/dp_10"
|
||||
app:tabIndicatorHeight="10dp"
|
||||
app:tabIndicator="@mipmap/tab_x"
|
||||
app:tabIndicator="@drawable/tab_indicator"
|
||||
app:tabIndicatorColor="@null"
|
||||
app:tabIndicatorFullWidth="false"
|
||||
app:tabIndicatorGravity="bottom"
|
||||
app:tabTextColor="@color/white"
|
||||
app:tabIndicatorHeight="10dp"
|
||||
app:tabMode="fixed"
|
||||
app:tabSelectedTextColor="@color/white"
|
||||
app:tabTextAppearance="@style/CustomTabTextAppearance"
|
||||
app:tabIndicatorFullWidth="true"
|
||||
app:tabIndicatorColor="@null"
|
||||
app:tabMode="fixed"/>
|
||||
<!-- app:tabBackground="@mipmap/real_img"-->
|
||||
<!-- app:tabInlineLabel="true"-->
|
||||
<!-- app:tabContentStart="@dimen/dp_23"-->
|
||||
<!-- app:tabGravity="center"-->
|
||||
<!-- app:tabIconTint="@color/color_FF333333"-->
|
||||
<!-- app:tabIconTintMode="add"-->
|
||||
<!-- app:tabIndicatorAnimationDuration="@integer/material_motion_duration_long_1"-->
|
||||
<!-- app:tabIndicator="@color/color_FF333333"-->
|
||||
<!-- app:tabIndicatorAnimationMode="elastic"-->
|
||||
<!-- app:tabIndicatorColor="@color/color_FF333333"-->
|
||||
<!-- app:tabIndicatorFullWidth="true"-->
|
||||
<!-- app:tabIndicatorGravity="center"-->
|
||||
<!-- app:tabIndicatorHeight="@dimen/dp_23"-->
|
||||
<!-- app:tabMaxWidth="@dimen/dp_23"-->
|
||||
<!-- app:tabMinWidth="@dimen/dp_23"-->
|
||||
<!-- app:tabMode="auto"-->
|
||||
<!-- app:tabPadding="@dimen/dp_23"-->
|
||||
<!-- app:tabRippleColor="@color/color_FF333333"-->
|
||||
<!-- app:tabSelectedTextAppearance="@dimen/dp_23"-->
|
||||
<!-- app:tabSelectedTextColor="@color/color_FF333333"-->
|
||||
<!-- app:tabTextAppearance="@dimen/dp_23"-->
|
||||
<!-- app:tabTextColor="@color/color_FF333333"-->
|
||||
<!-- app:tabUnboundedRipple="true"-->
|
||||
<!-- />-->
|
||||
app:tabTextColor="@color/white" />
|
||||
|
||||
<com.xscm.moduleutil.widget.ScrollViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tabs"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tabs" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -33,26 +33,6 @@
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
<!-- <com.scwang.smartrefresh.layout.SmartRefreshLayout-->
|
||||
<!-- android:id="@+id/smart_refresh_layout"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="wrap_content"-->
|
||||
<!-- app:layout_constraintTop_toBottomOf="@+id/app_bar_layout"-->
|
||||
<!-- app:srlEnableLoadMore="true"-->
|
||||
<!-- app:srlEnableRefresh="false">-->
|
||||
|
||||
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView-->
|
||||
<!-- android:id="@+id/recycle_view"-->
|
||||
<!-- android:layout_width="match_parent"-->
|
||||
<!-- android:layout_height="match_parent"-->
|
||||
<!-- android:paddingLeft="@dimen/dp_6"-->
|
||||
<!-- android:paddingRight="@dimen/dp_6"-->
|
||||
<!-- android:paddingBottom="@dimen/dp_50" />-->
|
||||
|
||||
|
||||
<!-- </com.scwang.smartrefresh.layout.SmartRefreshLayout>-->
|
||||
<com.scwang.smartrefresh.layout.SmartRefreshLayout
|
||||
android:id="@+id/smart_refresh_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
Reference in New Issue
Block a user