个人主页数据对接
@ -225,9 +225,8 @@ dependencies {
|
||||
api 'com.wuxiaolong.pullloadmorerecyclerview:library:1.1.2'
|
||||
//时间选择器
|
||||
api 'com.contrarywind:Android-PickerView:4.1.9'
|
||||
//播放器-https://github.com/yangchong211/YCVideoPlayer
|
||||
api 'cn.yc:VideoPlayer:3.1.0'
|
||||
api 'cn.yc:VideoCache:3.0.5'
|
||||
api 'cn.yc:VideoKernel:3.0.6'
|
||||
//UI框架
|
||||
api 'com.github.xuexiangjys:XUI:1.1.6'
|
||||
api 'com.github.xuexiangjys.XUtil:xutil-core:2.0.0'
|
||||
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.CommentAdapter;
|
||||
import com.yunbao.common.bean.ActiveBean;
|
||||
import com.yunbao.common.bean.CommentBean;
|
||||
import com.yunbao.common.dialog.ImagePreviewDialog;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.HttpCallback;
|
||||
@ -108,7 +109,19 @@ public class CommunityDetailsActivity extends AbsActivity {
|
||||
mNineGridLayout.setActionListener(new NineGridLayout.ActionListener() {
|
||||
@Override
|
||||
public void onItemClick(List<?> dataList, int position) {
|
||||
ImagePreviewDialog dialog = new ImagePreviewDialog();
|
||||
dialog.setImageInfo(dataList.size(), position, false, new ImagePreviewDialog.ActionListener() {
|
||||
@Override
|
||||
public void loadImage(ImageView imageView, int position) {
|
||||
ImgLoader.display(mContext, (String) (dataList.get(position)), imageView);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeleteClick(int position) {
|
||||
|
||||
}
|
||||
});
|
||||
dialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "ImagePreviewDialog");
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -160,6 +173,7 @@ public class CommunityDetailsActivity extends AbsActivity {
|
||||
});
|
||||
}
|
||||
});
|
||||
findViewById(R.id.setting).setVisibility(View.VISIBLE);
|
||||
findViewById(R.id.setting).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -172,7 +186,12 @@ public class CommunityDetailsActivity extends AbsActivity {
|
||||
if (tag == 0) {
|
||||
RouteUtil.forwardCommentReportActivity(activeBean.getId(), activeBean.getId());
|
||||
} else {
|
||||
|
||||
CommonHttpUtil.noInterest(activeBean.getUser_id(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
ToastUtil.show(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -217,7 +236,7 @@ public class CommunityDetailsActivity extends AbsActivity {
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<CommentBean> list = JSON.parseArray(Arrays.toString(info), CommentBean.class);
|
||||
if (list != null) {
|
||||
commentAdapter = new CommentAdapter(mContext, list);
|
||||
commentAdapter = new CommentAdapter(mContext, list, activeBean.getUser_id());
|
||||
commentAdapter.setOnItemClickListener(new CommentAdapter.onItemClickListener() {
|
||||
@Override
|
||||
public void onReply(CommentBean commentBean) {
|
||||
@ -231,8 +250,43 @@ public class CommunityDetailsActivity extends AbsActivity {
|
||||
|
||||
@Override
|
||||
public void onReport(CommentBean commentBean) {
|
||||
//一级回复 举报
|
||||
RouteUtil.forwardCommentReportActivity(activeBean.getId(), commentBean.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDel(CommentBean activeBean, int position) {
|
||||
//一级回复 删除
|
||||
CommonHttpUtil.delCom(activeBean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(msg);
|
||||
getReply();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReport(CommentBean.ReplyComment activeBean) {
|
||||
//二级回复 举报
|
||||
RouteUtil.forwardCommentReportActivity(activeBean.getId(), activeBean.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDel(CommentBean.ReplyComment activeBean) {
|
||||
//二级回复 删除
|
||||
CommonHttpUtil.delCom(activeBean.getId(), new HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
ToastUtil.show(msg);
|
||||
getReply();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
commentRecyclerView.setAdapter(commentAdapter);
|
||||
replyCount.setText("评论 " + list.size());
|
||||
|
@ -2,41 +2,99 @@ package com.yunbao.common.activity;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Outline;
|
||||
import android.view.View;
|
||||
import android.view.ViewOutlineProvider;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.ms.banner.Banner;
|
||||
import com.ms.banner.listener.OnBannerClickListener;
|
||||
import com.xuexiang.xui.widget.flowlayout.FlowTagLayout;
|
||||
import com.yunbao.common.Constants;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.LabelTagAdapter;
|
||||
import com.yunbao.common.adapter.UserCommunityAdapter;
|
||||
import com.yunbao.common.adapter.UserHomeImgAdapter;
|
||||
import com.yunbao.common.bean.ActiveOtherBean;
|
||||
import com.yunbao.common.bean.HomeUserExhibitInfoBean;
|
||||
import com.yunbao.common.bean.HomeUserInfoBean;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
import com.yunbao.common.bean.LabelBean;
|
||||
import com.yunbao.common.bean.MessageUserInfoBean;
|
||||
import com.yunbao.common.bean.UserHomeImgBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.http.CommonHttpUtil;
|
||||
import com.yunbao.common.http.base.HttpCallback;
|
||||
import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.TopGradual;
|
||||
import com.yunbao.common.views.UserHomeImgsViewHolder;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class UserHomeActivity extends AbsActivity {
|
||||
String uid;
|
||||
Banner mBanner;
|
||||
RecyclerView imgsRecyclerView;
|
||||
UserHomeImgAdapter userHomeImgAdapter;
|
||||
private String uid;
|
||||
private Banner mBanner;
|
||||
private RecyclerView imgsRecyclerView;
|
||||
private UserHomeImgAdapter userHomeImgAdapter;
|
||||
private List<String> bannerImgList = new ArrayList<>();
|
||||
private List<UserHomeImgBean> tempList;
|
||||
private RoundedImageView avatar;
|
||||
private TextView userName;
|
||||
private TextView fansCount;
|
||||
private TextView likeCount;
|
||||
private LinearLayout followLayout;
|
||||
private ImageView followIcon;
|
||||
private TextView followName;
|
||||
private TextView userId;
|
||||
private TextView userStatus;
|
||||
private ImageView userStatusIcon;
|
||||
private ImageView user_sex;
|
||||
private ImageView authorIcon;
|
||||
private TextView level;
|
||||
private ImageView levelIcon;
|
||||
private TextView vipLevel;
|
||||
private LinearLayout authenticationLayout;
|
||||
private TextView signature;
|
||||
private LinearLayout moreLayout;
|
||||
private TextView moreText;
|
||||
private ImageView moreIcon;
|
||||
private HomeUserInfoBean userInfo;
|
||||
RecyclerView communityRecyclerView;
|
||||
private LinearLayout itemLayout01;
|
||||
private LinearLayout itemLayout02;
|
||||
private LinearLayout itemLayout03;
|
||||
private LinearLayout itemLayout04;
|
||||
FlowTagLayout myFlowTag; //我的标签
|
||||
LabelTagAdapter myAdapter;
|
||||
private boolean isShowcase;
|
||||
private boolean isAnchor;
|
||||
private RelativeLayout userPresidentLayout;
|
||||
private TextView userPresidentName;
|
||||
private RelativeLayout authorLayout;
|
||||
private RelativeLayout levelLayout;
|
||||
private RoundedImageView fansImg1;
|
||||
private RoundedImageView fansImg2;
|
||||
private RoundedImageView fansImg3;
|
||||
|
||||
List<String> bannerImgList = new ArrayList<>();
|
||||
List<UserHomeImgBean> tempList;
|
||||
private List<RoundedImageView> fansImgViewList = new ArrayList<>();
|
||||
|
||||
public static void forwardUserHomeActivity(Context content, String uid) {
|
||||
Intent intent = new Intent(content, UserHomeActivity.class);
|
||||
intent.putExtra(Constants.TO_UID, String.valueOf(97717));
|
||||
intent.putExtra(Constants.TO_UID, uid);
|
||||
content.startActivity(intent);
|
||||
}
|
||||
|
||||
@ -59,36 +117,123 @@ public class UserHomeActivity extends AbsActivity {
|
||||
return;
|
||||
}
|
||||
initView();
|
||||
initUseData();
|
||||
initUserImgs();
|
||||
getUseData();
|
||||
getCommunityList();
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
mBanner = (Banner) findViewById(R.id.banner);
|
||||
imgsRecyclerView = findViewById(R.id.imgsRecyclerView);
|
||||
imgsRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
imgsRecyclerView.addItemDecoration(new TopGradual());
|
||||
imgsRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
private void getCommunityList() {
|
||||
CommonHttpUtil.getOtherDynamicList(uid, new com.yunbao.common.http.HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
List<ActiveOtherBean> beanList = JSONArray.parseArray(Arrays.toString(info), ActiveOtherBean.class);
|
||||
UserCommunityAdapter userCommunityAdapter = new UserCommunityAdapter(mContext, beanList);
|
||||
communityRecyclerView.setAdapter(userCommunityAdapter);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void initUserImgs() {
|
||||
private void initData(HomeUserInfoBean userInfoBean) {
|
||||
userInfo = userInfoBean;
|
||||
if (!userInfo.getCheckBlack().get(0).getU2t().equals("0")) {
|
||||
ToastUtil.show("已拉黑,无法查看");
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getUser_president_name())) {
|
||||
userPresidentLayout.setVisibility(View.VISIBLE);
|
||||
userPresidentName.setText(userInfo.getUserHomeTopInfo().getUser_president_name());
|
||||
}
|
||||
isAnchor = userInfo.getUserHomeTopInfo().getIs_anchor() == 1;
|
||||
if (isAnchor) {
|
||||
authorLayout.setVisibility(View.VISIBLE);
|
||||
levelLayout.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
authorLayout.setVisibility(View.GONE);
|
||||
}
|
||||
ImgLoader.display(UserHomeActivity.this, userInfo.getUserHomeTopInfo().getUser_avatar(), avatar);
|
||||
userName.setText(userInfo.getUserHomeTopInfo().getUser_name());//用户名称
|
||||
fansCount.setText(String.valueOf(userInfo.getUserHomeTopInfo().getUser_fans_num()));//粉丝数量
|
||||
likeCount.setText(String.valueOf(userInfo.getUserHomeTopInfo().getUser_love_num()));//关注数量
|
||||
|
||||
userId.setText("ID:" + userInfo.getUserHomeTopInfo().getUser_id());//用户ID
|
||||
userStatus.setText("");//认证状态
|
||||
ImgLoader.display(UserHomeActivity.this, Integer.parseInt(String.valueOf(userInfo.getUserHomeTopInfo().getUser_sex())) == 0 ? R.mipmap.icon_man_new : R.mipmap.icon_wumen, user_sex);
|
||||
ImgLoader.display(UserHomeActivity.this, userInfo.getUserHomeTopInfo().getUser_level_anchor_img(), authorIcon);
|
||||
ImgLoader.display(UserHomeActivity.this, userInfo.getUserHomeTopInfo().getUser_level_img(), levelIcon);
|
||||
|
||||
if (isAnchor) {//是否是主播
|
||||
authenticationLayout.setVisibility(View.VISIBLE);
|
||||
itemLayout01.setVisibility(View.VISIBLE);
|
||||
itemLayout02.setVisibility(View.VISIBLE);
|
||||
itemLayout03.setVisibility(View.VISIBLE);
|
||||
itemLayout04.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
authenticationLayout.setVisibility(View.GONE);
|
||||
itemLayout03.setVisibility(View.VISIBLE);
|
||||
itemLayout04.setVisibility(View.VISIBLE);
|
||||
}
|
||||
signature.setText(userInfo.getUserHomeTopInfo().getUser_signature());//个性签名
|
||||
//标签
|
||||
myAdapter = new LabelTagAdapter(mContext, new LabelTagAdapter.OnSureOnClickListener() {
|
||||
@Override
|
||||
public void sure(LabelBean.Children labelBean) {
|
||||
|
||||
}
|
||||
});
|
||||
if (userInfo.getUserHomeTopInfo().getCn_label() != null) {
|
||||
if (userInfo.getUserHomeTopInfo().getCn_label().size() > 0) {
|
||||
myFlowTag.setAdapter(myAdapter);
|
||||
myFlowTag.setTagCheckedMode(FlowTagLayout.FLOW_TAG_CHECKED_NONE);
|
||||
myAdapter.setData(userInfo.getUserHomeTopInfo().getCn_label());
|
||||
}
|
||||
}
|
||||
mBanner.setOutlineProvider(new ViewOutlineProvider() {
|
||||
@Override
|
||||
public void getOutline(View view, Outline outline) {
|
||||
outline.setRoundRect(0, 0, view.getWidth(), view.getHeight(), 10);
|
||||
outline.setRoundRect(0, 0, 0, 0, 0);
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(UserHomeActivity.this).getUserHomeBanner(uid, new HttpCallback<List<String>>() {
|
||||
mBanner.setOnPageChangeListener(new ViewPager.OnPageChangeListener() {
|
||||
@Override
|
||||
public void onSuccess(List<String> data) {
|
||||
bannerImgList = data;
|
||||
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
|
||||
}
|
||||
});
|
||||
bannerImgList = userInfo.getUserHomeTopInfo().getUser_home_banner();
|
||||
tempList = new ArrayList<>();
|
||||
for (int i = 0; i < data.size(); i++) {
|
||||
tempList.add(new UserHomeImgBean(data.get(i)));
|
||||
for (int i = 0; i < bannerImgList.size(); i++) {
|
||||
tempList.add(new UserHomeImgBean(bannerImgList.get(i)));
|
||||
}
|
||||
tempList.get(0).setShow(true);
|
||||
userHomeImgAdapter = new UserHomeImgAdapter(UserHomeActivity.this, tempList);
|
||||
imgsRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
imgsRecyclerView.setAdapter(userHomeImgAdapter);
|
||||
|
||||
userHomeImgAdapter.setOnItemClickListener(new UserHomeImgAdapter.onItemClickListener() {
|
||||
@Override
|
||||
public void onImgItem(UserHomeImgBean activeBean, int position) {
|
||||
mBanner.onPageSelected(position);
|
||||
mBanner.setCurrentPage(position);
|
||||
for (int i = 0; i < tempList.size(); i++) {
|
||||
if (i == position) {
|
||||
tempList.get(i).setShow(true);
|
||||
} else {
|
||||
tempList.get(i).setShow(false);
|
||||
}
|
||||
}
|
||||
userHomeImgAdapter.setCommentBeanList(tempList);
|
||||
}
|
||||
});
|
||||
mBanner.setAutoPlay(false).setPages(bannerImgList, new UserHomeImgsViewHolder()).setOnBannerClickListener(new OnBannerClickListener() {
|
||||
@Override
|
||||
public void onBannerClick(List datas, int position) {
|
||||
@ -97,9 +242,107 @@ public class UserHomeActivity extends AbsActivity {
|
||||
}).start();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
private void initView() {
|
||||
fansImg1 = findViewById(R.id.fansImg1);
|
||||
fansImg2 = findViewById(R.id.fansImg2);
|
||||
fansImg3 = findViewById(R.id.fansImg3);
|
||||
fansImgViewList = new ArrayList<>();
|
||||
fansImgViewList.add(fansImg1);
|
||||
fansImgViewList.add(fansImg2);
|
||||
fansImgViewList.add(fansImg3);
|
||||
authorLayout = findViewById(R.id.authorLayout);
|
||||
levelLayout = findViewById(R.id.levelLayout);
|
||||
userPresidentLayout = findViewById(R.id.userPresidentLayout);
|
||||
userPresidentName = findViewById(R.id.userPresidentName);
|
||||
itemLayout01 = findViewById(R.id.itemLayout01);
|
||||
itemLayout02 = findViewById(R.id.itemLayout02);
|
||||
itemLayout03 = findViewById(R.id.itemLayout03);
|
||||
itemLayout04 = findViewById(R.id.itemLayout04);
|
||||
communityRecyclerView = findViewById(R.id.communityRecyclerView);
|
||||
myFlowTag = findViewById(R.id.myFlowTag);
|
||||
avatar = findViewById(R.id.avatar);
|
||||
userName = findViewById(R.id.name);
|
||||
fansCount = findViewById(R.id.fansCount);
|
||||
likeCount = findViewById(R.id.likeCount);
|
||||
followLayout = findViewById(R.id.followLayout);
|
||||
followName = findViewById(R.id.followName);
|
||||
followIcon = findViewById(R.id.followIcon);
|
||||
userId = findViewById(R.id.userId);
|
||||
userStatus = findViewById(R.id.userStatus);
|
||||
userStatusIcon = findViewById(R.id.userStatusIcon);
|
||||
user_sex = findViewById(R.id.user_sex);
|
||||
levelIcon = findViewById(R.id.levelIcon);
|
||||
level = findViewById(R.id.level);
|
||||
authorIcon = findViewById(R.id.authorlIcon);
|
||||
authenticationLayout = findViewById(R.id.authenticationLayout);
|
||||
signature = findViewById(R.id.signature);
|
||||
moreLayout = findViewById(R.id.moreLayout);
|
||||
moreText = findViewById(R.id.moreText);
|
||||
moreIcon = findViewById(R.id.moreIcon);
|
||||
|
||||
mBanner = findViewById(R.id.banner);
|
||||
imgsRecyclerView = findViewById(R.id.imgsRecyclerView);
|
||||
|
||||
communityRecyclerView = findViewById(R.id.communityRecyclerView);
|
||||
communityRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.VERTICAL, false));
|
||||
communityRecyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
|
||||
findViewById(R.id.back).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
}
|
||||
});
|
||||
followLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
CommonHttpUtil.setAttention(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id()), new CommonCallback<Integer>() {
|
||||
@Override
|
||||
public void callback(Integer isAttention) {
|
||||
if (isAttention == 1) {
|
||||
ImgLoader.display(UserHomeActivity.this, R.mipmap.icon_like_followed, followIcon);
|
||||
followName.setText("已关注");
|
||||
followName.setTextColor(Color.parseColor("#777777"));
|
||||
followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type_1));
|
||||
} else {
|
||||
ImgLoader.display(UserHomeActivity.this, R.mipmap.icon_like_follow, followIcon);
|
||||
followName.setText("关注");
|
||||
followName.setTextColor(getResources().getColor(R.color.white));
|
||||
followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
moreLayout.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (isShowcase) {
|
||||
if (isAnchor) {
|
||||
itemLayout01.setVisibility(View.GONE);
|
||||
itemLayout02.setVisibility(View.GONE);
|
||||
itemLayout03.setVisibility(View.GONE);
|
||||
itemLayout04.setVisibility(View.GONE);
|
||||
} else {
|
||||
itemLayout03.setVisibility(View.GONE);
|
||||
itemLayout04.setVisibility(View.GONE);
|
||||
}
|
||||
moreText.setText("查看更多");
|
||||
ImgLoader.display(mContext, R.mipmap.icon_down, moreIcon);
|
||||
} else {
|
||||
if (isAnchor) {
|
||||
itemLayout01.setVisibility(View.VISIBLE);
|
||||
itemLayout02.setVisibility(View.VISIBLE);
|
||||
itemLayout03.setVisibility(View.VISIBLE);
|
||||
itemLayout04.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
itemLayout01.setVisibility(View.GONE);
|
||||
itemLayout02.setVisibility(View.GONE);
|
||||
}
|
||||
moreText.setText("收起");
|
||||
ImgLoader.display(mContext, R.mipmap.icon_up, moreIcon);
|
||||
}
|
||||
isShowcase = !isShowcase;
|
||||
}
|
||||
});
|
||||
findViewById(R.id.back).setOnClickListener(new View.OnClickListener() {
|
||||
@ -110,8 +353,33 @@ public class UserHomeActivity extends AbsActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void initUseData() {
|
||||
private void getUseData() {
|
||||
LiveNetManager.get(mContext).getUserHomeInfo(uid, new HttpCallback<HomeUserInfoBean>() {
|
||||
@Override
|
||||
public void onSuccess(HomeUserInfoBean data) {
|
||||
initData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
LiveNetManager.get(mContext).getUserExhibitInfoInfo(uid, new HttpCallback<HomeUserExhibitInfoBean>() {
|
||||
@Override
|
||||
public void onSuccess(HomeUserExhibitInfoBean data) {
|
||||
if (data.getUserHomeTopInfo().getFans().getList() != null) {
|
||||
for (int i = 0; i < data.getUserHomeTopInfo().getFans().getList().size(); i++) {
|
||||
ImgLoader.display(mContext, data.getUserHomeTopInfo().getFans().getList().get(i).getAvatar(), fansImgViewList.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CommentBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@ -24,15 +25,19 @@ import java.util.List;
|
||||
public class CommentAdapter extends RecyclerView.Adapter {
|
||||
private List<CommentBean> commentBeanList;
|
||||
private Context mContext;
|
||||
private String authorId;
|
||||
private String myUid;
|
||||
private onItemClickListener onItemClickListener;
|
||||
|
||||
public void setOnItemClickListener(CommentAdapter.onItemClickListener onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public CommentAdapter(Context content, List<CommentBean> commentBeanList) {
|
||||
public CommentAdapter(Context content, List<CommentBean> commentBeanList, String authorId) {
|
||||
this.mContext = content;
|
||||
this.commentBeanList = commentBeanList;
|
||||
this.authorId = authorId;
|
||||
myUid = CommonAppConfig.getInstance().getUid();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@ -66,6 +71,10 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
private LinearLayout replyLayout;
|
||||
private TextView firstName;
|
||||
private TextView isAuth;
|
||||
private TextView del;
|
||||
private TextView author;
|
||||
private TextView del1;
|
||||
private TextView report1;
|
||||
|
||||
public CommentViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@ -81,6 +90,10 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
replyCount = itemView.findViewById(R.id.expand);
|
||||
replyLayout = itemView.findViewById(R.id.replyLayout);
|
||||
recyclerView = itemView.findViewById(R.id.recyclerView);
|
||||
del = itemView.findViewById(R.id.del);
|
||||
author = itemView.findViewById(R.id.author);
|
||||
del1 = itemView.findViewById(R.id.del1);
|
||||
report1 = itemView.findViewById(R.id.report1);
|
||||
report.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
@ -99,6 +112,15 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
}
|
||||
});
|
||||
del.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onItemClickListener != null) {
|
||||
CommentBean bean = (CommentBean) v.getTag();
|
||||
onItemClickListener.onDel(bean, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
@ -108,6 +130,16 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
ImgLoader.display(itemView.getContext(), bean.getUser_avatar(), mAvatar);
|
||||
name.setText(bean.getUser_name());
|
||||
content.setText(bean.getContent());
|
||||
if (bean.getUser_id().equals(authorId)) {
|
||||
author.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
author.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getUser_id().equals(myUid)) {
|
||||
del.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
del.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getReplyCommentList() != null) {
|
||||
replyCount.setText("共" + bean.getReplyCommentList().size() + "条回复>");
|
||||
if (bean.getReplyCommentList().size() > 0) {
|
||||
@ -115,6 +147,16 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
ImgLoader.display(itemView.getContext(), bean.getReplyCommentList().get(0).getUser_avatar(), mAvatar01);
|
||||
firstName.setText(bean.getReplyCommentList().get(0).getUser_name());
|
||||
replyLayout.setVisibility(View.VISIBLE);
|
||||
if (bean.getReplyCommentList().get(0).getUser_id().equals(authorId)) {
|
||||
isAuth.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
isAuth.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getUser_id().equals(myUid)) {
|
||||
del.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
del.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
replyLayout.setVisibility(View.GONE);
|
||||
replyCount.setVisibility(View.GONE);
|
||||
@ -127,7 +169,22 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
List<CommentBean.ReplyComment> tempList = new ArrayList<>();
|
||||
tempList.addAll(bean.getReplyCommentList());
|
||||
tempList.remove(0);
|
||||
CommentReplyAdapter commentReplyAdapter = new CommentReplyAdapter(mContext, tempList);
|
||||
CommentReplyAdapter commentReplyAdapter = new CommentReplyAdapter(mContext, tempList, authorId);
|
||||
commentReplyAdapter.setOnItemClickListener(new CommentReplyAdapter.onItemClickListener() {
|
||||
@Override
|
||||
public void onReport(CommentBean.ReplyComment activeBean) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onReport(activeBean);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDel(CommentBean.ReplyComment activeBean) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onDel(activeBean);
|
||||
}
|
||||
}
|
||||
});
|
||||
recyclerView.setAdapter(commentReplyAdapter);
|
||||
recyclerView.setOverScrollMode(View.OVER_SCROLL_NEVER);
|
||||
replyCount.setOnClickListener(new View.OnClickListener() {
|
||||
@ -152,6 +209,12 @@ public class CommentAdapter extends RecyclerView.Adapter {
|
||||
void onReply(CommentBean activeBean);
|
||||
|
||||
void onReport(CommentBean activeBean);
|
||||
|
||||
void onDel(CommentBean activeBean, int position);
|
||||
|
||||
void onReport(CommentBean.ReplyComment activeBean);
|
||||
|
||||
void onDel(CommentBean.ReplyComment activeBean);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.CommonAppConfig;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.CommentBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
@ -20,10 +21,19 @@ import java.util.List;
|
||||
public class CommentReplyAdapter extends RecyclerView.Adapter {
|
||||
private List<CommentBean.ReplyComment> commentBeanList;
|
||||
private Context mContext;
|
||||
private String authorId;
|
||||
private String myUid;
|
||||
private onItemClickListener onItemClickListener;
|
||||
|
||||
public CommentReplyAdapter(Context content, List<CommentBean.ReplyComment> commentBeanList) {
|
||||
public void setOnItemClickListener(onItemClickListener onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public CommentReplyAdapter(Context content, List<CommentBean.ReplyComment> commentBeanList, String authorId) {
|
||||
this.mContext = content;
|
||||
this.commentBeanList = commentBeanList;
|
||||
this.authorId = authorId;
|
||||
myUid = CommonAppConfig.getInstance().getUid();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@ -48,19 +58,58 @@ public class CommentReplyAdapter extends RecyclerView.Adapter {
|
||||
private TextView name;
|
||||
private RoundedImageView mAvatar01;
|
||||
private TextView replyContent;
|
||||
private TextView author;
|
||||
private TextView del;
|
||||
private TextView report;
|
||||
|
||||
public CommentViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
name = itemView.findViewById(R.id.name);
|
||||
mAvatar01 = itemView.findViewById(R.id.avatar01);
|
||||
replyContent = itemView.findViewById(R.id.replyContent);
|
||||
author = itemView.findViewById(R.id.author);
|
||||
del = itemView.findViewById(R.id.del);
|
||||
report = itemView.findViewById(R.id.report);
|
||||
del.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onDel((CommentBean.ReplyComment) v.getTag());
|
||||
}
|
||||
}
|
||||
});
|
||||
report.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onReport((CommentBean.ReplyComment) v.getTag());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void setData(CommentBean.ReplyComment bean) {
|
||||
del.setTag(bean);
|
||||
ImgLoader.display(itemView.getContext(), bean.getUser_avatar(), mAvatar01);
|
||||
name.setText(bean.getUser_name());
|
||||
replyContent.setText(bean.getContent());
|
||||
if (bean.getUser_id().equals(authorId)) {
|
||||
author.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
author.setVisibility(View.GONE);
|
||||
}
|
||||
if (bean.getUser_id().equals(myUid)) {
|
||||
del.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
del.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface onItemClickListener {
|
||||
void onReport(CommentBean.ReplyComment activeBean);
|
||||
|
||||
void onDel(CommentBean.ReplyComment activeBean);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,112 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.PagerSnapHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
|
||||
|
||||
/**
|
||||
* Created by cxf on 2018/11/28.
|
||||
*/
|
||||
|
||||
public class ImagePreviewAdapter extends RecyclerView.Adapter<ImagePreviewAdapter.Vh> {
|
||||
|
||||
private LayoutInflater mInflater;
|
||||
private ActionListener mActionListener;
|
||||
private int mPageCount;
|
||||
private LinearLayoutManager mLayoutManager;
|
||||
private int mCurPosition;
|
||||
|
||||
public ImagePreviewAdapter(Context context, int pageCount) {
|
||||
mPageCount = pageCount;
|
||||
mInflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public Vh onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
return new Vh(mInflater.inflate(R.layout.item_preview_img, parent, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull Vh vh, int position) {
|
||||
vh.setData(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return mPageCount;
|
||||
}
|
||||
|
||||
|
||||
class Vh extends RecyclerView.ViewHolder {
|
||||
|
||||
ImageView mImg;
|
||||
|
||||
public Vh(View itemView) {
|
||||
super(itemView);
|
||||
mImg = (ImageView) itemView;
|
||||
}
|
||||
|
||||
void setData(int position) {
|
||||
if (mActionListener != null) {
|
||||
mActionListener.loadImage(mImg, position);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActionListener(ActionListener actionListener) {
|
||||
mActionListener = actionListener;
|
||||
}
|
||||
|
||||
public void setCurPosition(int curPosition) {
|
||||
mCurPosition = curPosition;
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onPageChanged(curPosition);
|
||||
}
|
||||
}
|
||||
|
||||
public int getCurPosition(){
|
||||
return mCurPosition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
|
||||
super.onAttachedToRecyclerView(recyclerView);
|
||||
mLayoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
|
||||
PagerSnapHelper pagerSnapHelper = new PagerSnapHelper();
|
||||
pagerSnapHelper.attachToRecyclerView(recyclerView);
|
||||
recyclerView.setOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||
@Override
|
||||
public void onScrollStateChanged(RecyclerView recyclerView, int newState) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onScrolled(RecyclerView recyclerView, int dx, int dy) {
|
||||
int position = mLayoutManager.findFirstCompletelyVisibleItemPosition();
|
||||
if (position >= 0 && mCurPosition != position) {
|
||||
mCurPosition = position;
|
||||
if (mActionListener != null) {
|
||||
mActionListener.onPageChanged(position);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public interface ActionListener {
|
||||
void onPageChanged(int position);
|
||||
|
||||
void loadImage(ImageView imageView, int position);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.xuexiang.xui.widget.flowlayout.BaseTagAdapter;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.LabelBean;
|
||||
|
||||
public class LabelTagAdapter extends BaseTagAdapter<String, TextView> {
|
||||
|
||||
OnSureOnClickListener onSureOnClickListener;
|
||||
|
||||
Context mContext;
|
||||
|
||||
public LabelTagAdapter(Context context, OnSureOnClickListener onSureOnClickListener) {
|
||||
super(context);
|
||||
this.onSureOnClickListener = onSureOnClickListener;
|
||||
this.mContext = context;
|
||||
}
|
||||
|
||||
public LabelTagAdapter(Context context) {
|
||||
super(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected TextView newViewHolder(View convertView) {
|
||||
return (TextView) convertView.findViewById(R.id.tv_tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.adapter_item_tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(TextView textView, String item, int position) {
|
||||
textView.setText(item);
|
||||
textView.setTextColor(mContext.getResources().getColor(R.color.black2));
|
||||
}
|
||||
|
||||
public interface OnSureOnClickListener {
|
||||
void sure(LabelBean.Children labelBean);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
package com.yunbao.common.adapter;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.makeramen.roundedimageview.RoundedImageView;
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.bean.ActiveOtherBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.views.NineGridLayout;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||
private List<ActiveOtherBean> commentBeanList;
|
||||
private Context mContext;
|
||||
private onItemClickListener onItemClickListener;
|
||||
|
||||
public void setOnItemClickListener(UserCommunityAdapter.onItemClickListener onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public UserCommunityAdapter(Context content, List<ActiveOtherBean> commentBeanList) {
|
||||
this.mContext = content;
|
||||
this.commentBeanList = commentBeanList;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.activity_user_community_item, parent, false);
|
||||
return new CommentViewHolder(view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
CommentViewHolder commentViewHolder = (CommentViewHolder) holder;
|
||||
commentViewHolder.setData(commentBeanList.get(position));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return commentBeanList.size();
|
||||
}
|
||||
|
||||
class CommentViewHolder extends RecyclerView.ViewHolder {
|
||||
private RoundedImageView mAvatar;
|
||||
private TextView userName;
|
||||
private TextView time;
|
||||
private TextView content;
|
||||
private NineGridLayout nineGridLayout;
|
||||
private RelativeLayout videoLayout;
|
||||
private ImageView videoImage;
|
||||
private TextView likeCount;
|
||||
private TextView comCount;
|
||||
private TextView shareCount;
|
||||
|
||||
public CommentViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mAvatar = itemView.findViewById(R.id.avatar);
|
||||
userName = itemView.findViewById(R.id.userName);
|
||||
time = itemView.findViewById(R.id.time);
|
||||
content = itemView.findViewById(R.id.content);
|
||||
nineGridLayout = itemView.findViewById(R.id.nine_grid_layout);
|
||||
videoLayout = itemView.findViewById(R.id.videoLayout);
|
||||
videoImage = itemView.findViewById(R.id.videoImage);
|
||||
likeCount = itemView.findViewById(R.id.likeCount);
|
||||
comCount = itemView.findViewById(R.id.comCount);
|
||||
shareCount = itemView.findViewById(R.id.shareCount);
|
||||
|
||||
mAvatar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onItemClickListener.onImgItem((String) v.getTag(), getPosition());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void setData(ActiveOtherBean bean) {
|
||||
mAvatar.setTag(bean);
|
||||
ImgLoader.display(mContext, bean.getUser_avatar(), mAvatar);
|
||||
userName.setText(bean.getUser_name());
|
||||
time.setText(bean.getCreate_time());
|
||||
content.setText(String.valueOf(JSONObject.parseObject(bean.getContent()).get("msg")));
|
||||
likeCount.setText(String.valueOf(bean.getLove_num()));
|
||||
comCount.setText(String.valueOf(bean.getComment_num()));
|
||||
shareCount.setText(String.valueOf(bean.getShare_num()));
|
||||
nineGridLayout.setActionListener(new NineGridLayout.ActionListener() {
|
||||
@Override
|
||||
public void onItemClick(List<?> dataList, int position) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayImage(Object path, ImageView imageView) {
|
||||
ImgLoader.display(mContext, String.valueOf(path), imageView);
|
||||
}
|
||||
});
|
||||
if (bean.getImg_or_video().equals("1")) {//图片
|
||||
JSONArray jsonArray = (JSONArray) JSONArray.parse(bean.getImg_json());
|
||||
List<String> tempList = new ArrayList<>();
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
tempList.add(String.valueOf(jsonArray.get(i)));
|
||||
}
|
||||
nineGridLayout.setData(tempList);
|
||||
} else {
|
||||
ImgLoader.display(mContext, bean.getUser_avatar(), videoImage);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public interface onItemClickListener {
|
||||
void onImgItem(String activeBean, int position);
|
||||
}
|
||||
}
|
@ -5,6 +5,8 @@ import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@ -25,11 +27,20 @@ public class UserHomeImgAdapter extends RecyclerView.Adapter {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public List<UserHomeImgBean> getCommentBeanList() {
|
||||
return commentBeanList;
|
||||
}
|
||||
|
||||
public UserHomeImgAdapter(Context content, List<UserHomeImgBean> commentBeanList) {
|
||||
this.mContext = content;
|
||||
this.commentBeanList = commentBeanList;
|
||||
}
|
||||
|
||||
public void setCommentBeanList(List<UserHomeImgBean> commentBeanList) {
|
||||
this.commentBeanList = commentBeanList;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||
@ -39,8 +50,7 @@ public class UserHomeImgAdapter extends RecyclerView.Adapter {
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
||||
CommentViewHolder commentViewHolder = (CommentViewHolder) holder;
|
||||
commentViewHolder.setData(commentBeanList.get(position));
|
||||
((CommentViewHolder) holder).setData(commentBeanList.get(position), position);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -49,38 +59,37 @@ public class UserHomeImgAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
|
||||
class CommentViewHolder extends RecyclerView.ViewHolder {
|
||||
private RoundedImageView mAvatar;
|
||||
RoundedImageView mAvatar01;
|
||||
RoundedImageView mAvatar02;
|
||||
|
||||
public CommentViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
mAvatar = itemView.findViewById(R.id.avatar);
|
||||
mAvatar.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onItemClickListener.onImgItem((String) v.getTag());
|
||||
}
|
||||
});
|
||||
mAvatar01 = itemView.findViewById(R.id.avatar01);
|
||||
mAvatar02 = itemView.findViewById(R.id.avatar02);
|
||||
}
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
public void setData(UserHomeImgBean bean) {
|
||||
mAvatar.setTag(bean);
|
||||
ImgLoader.display(itemView.getContext(), bean.getImgurl(), mAvatar);
|
||||
public void setData(UserHomeImgBean bean, int position) {
|
||||
mAvatar01.setTag(bean);
|
||||
mAvatar01.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onItemClickListener.onImgItem((UserHomeImgBean) v.getTag(), position);
|
||||
}
|
||||
});
|
||||
ImgLoader.display(mContext, bean.getImgurl(), mAvatar01);
|
||||
ImgLoader.display(mContext, bean.getImgurl(), mAvatar02);
|
||||
if (bean.isShow()) {
|
||||
ViewGroup.LayoutParams viewGroup = mAvatar.getLayoutParams();
|
||||
viewGroup.height = 200;
|
||||
viewGroup.width = 200;
|
||||
mAvatar.setLayoutParams(viewGroup);
|
||||
mAvatar01.setVisibility(View.GONE);
|
||||
mAvatar02.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
ViewGroup.LayoutParams viewGroup = mAvatar.getLayoutParams();
|
||||
viewGroup.height = 100;
|
||||
viewGroup.width = 100;
|
||||
mAvatar.setLayoutParams(viewGroup);
|
||||
mAvatar01.setVisibility(View.VISIBLE);
|
||||
mAvatar02.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public interface onItemClickListener {
|
||||
void onImgItem(String activeBean);
|
||||
void onImgItem(UserHomeImgBean activeBean, int position);
|
||||
}
|
||||
}
|
||||
|
281
common/src/main/java/com/yunbao/common/bean/ActiveOtherBean.java
Normal file
@ -0,0 +1,281 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
/**
|
||||
* 社區动态
|
||||
*/
|
||||
public class ActiveOtherBean extends BaseModel implements Parcelable {
|
||||
private String id;
|
||||
private String img_or_video;
|
||||
private String img_json;
|
||||
private String video;
|
||||
private String content;
|
||||
private String talk_id;
|
||||
private String love_num;
|
||||
private String comment_num;
|
||||
private String share_num;
|
||||
private String gift_num;
|
||||
private String hot_num;
|
||||
private String create_time;
|
||||
private String ai_content;
|
||||
private String is_delete;
|
||||
private String user_name;
|
||||
private String user_avatar;
|
||||
private String is_anchor;
|
||||
private String is_live;
|
||||
private String is_attention;
|
||||
private String user_id;
|
||||
private String talk_name;
|
||||
private String is_love;
|
||||
|
||||
public ActiveOtherBean() {
|
||||
}
|
||||
|
||||
protected ActiveOtherBean(Parcel in) {
|
||||
id = in.readString();
|
||||
img_or_video = in.readString();
|
||||
img_json = in.readString();
|
||||
video = in.readString();
|
||||
content = in.readString();
|
||||
talk_id = in.readString();
|
||||
love_num = in.readString();
|
||||
comment_num = in.readString();
|
||||
share_num = in.readString();
|
||||
gift_num = in.readString();
|
||||
hot_num = in.readString();
|
||||
create_time = in.readString();
|
||||
ai_content = in.readString();
|
||||
is_delete = in.readString();
|
||||
user_name = in.readString();
|
||||
user_avatar = in.readString();
|
||||
is_anchor = in.readString();
|
||||
is_live = in.readString();
|
||||
is_attention = in.readString();
|
||||
user_id = in.readString();
|
||||
talk_name = in.readString();
|
||||
is_love = in.readString();
|
||||
}
|
||||
|
||||
public static final Creator<ActiveOtherBean> CREATOR = new Creator<ActiveOtherBean>() {
|
||||
@Override
|
||||
public ActiveOtherBean createFromParcel(Parcel in) {
|
||||
return new ActiveOtherBean(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActiveOtherBean[] newArray(int size) {
|
||||
return new ActiveOtherBean[size];
|
||||
}
|
||||
};
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getImg_or_video() {
|
||||
return img_or_video;
|
||||
}
|
||||
|
||||
public void setImg_or_video(String img_or_video) {
|
||||
this.img_or_video = img_or_video;
|
||||
}
|
||||
|
||||
public String getImg_json() {
|
||||
return img_json;
|
||||
}
|
||||
|
||||
public void setImg_json(String img_json) {
|
||||
this.img_json = img_json;
|
||||
}
|
||||
|
||||
public String getVideo() {
|
||||
return video;
|
||||
}
|
||||
|
||||
public void setVideo(String video) {
|
||||
this.video = video;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getTalk_id() {
|
||||
return talk_id;
|
||||
}
|
||||
|
||||
public void setTalk_id(String talk_id) {
|
||||
this.talk_id = talk_id;
|
||||
}
|
||||
|
||||
public String getLove_num() {
|
||||
return love_num;
|
||||
}
|
||||
|
||||
public void setLove_num(String love_num) {
|
||||
this.love_num = love_num;
|
||||
}
|
||||
|
||||
public String getComment_num() {
|
||||
return comment_num;
|
||||
}
|
||||
|
||||
public void setComment_num(String comment_num) {
|
||||
this.comment_num = comment_num;
|
||||
}
|
||||
|
||||
public String getShare_num() {
|
||||
return share_num;
|
||||
}
|
||||
|
||||
public void setShare_num(String share_num) {
|
||||
this.share_num = share_num;
|
||||
}
|
||||
|
||||
public String getGift_num() {
|
||||
return gift_num;
|
||||
}
|
||||
|
||||
public void setGift_num(String gift_num) {
|
||||
this.gift_num = gift_num;
|
||||
}
|
||||
|
||||
public String getHot_num() {
|
||||
return hot_num;
|
||||
}
|
||||
|
||||
public void setHot_num(String hot_num) {
|
||||
this.hot_num = hot_num;
|
||||
}
|
||||
|
||||
public String getCreate_time() {
|
||||
return create_time;
|
||||
}
|
||||
|
||||
public void setCreate_time(String create_time) {
|
||||
this.create_time = create_time;
|
||||
}
|
||||
|
||||
public String getAi_content() {
|
||||
return ai_content;
|
||||
}
|
||||
|
||||
public void setAi_content(String ai_content) {
|
||||
this.ai_content = ai_content;
|
||||
}
|
||||
|
||||
public String getIs_delete() {
|
||||
return is_delete;
|
||||
}
|
||||
|
||||
public void setIs_delete(String is_delete) {
|
||||
this.is_delete = is_delete;
|
||||
}
|
||||
|
||||
public String getUser_name() {
|
||||
return user_name;
|
||||
}
|
||||
|
||||
public void setUser_name(String user_name) {
|
||||
this.user_name = user_name;
|
||||
}
|
||||
|
||||
public String getUser_avatar() {
|
||||
return user_avatar;
|
||||
}
|
||||
|
||||
public void setUser_avatar(String user_avatar) {
|
||||
this.user_avatar = user_avatar;
|
||||
}
|
||||
|
||||
public String getIs_anchor() {
|
||||
return is_anchor;
|
||||
}
|
||||
|
||||
public void setIs_anchor(String is_anchor) {
|
||||
this.is_anchor = is_anchor;
|
||||
}
|
||||
|
||||
public String getIs_live() {
|
||||
return is_live;
|
||||
}
|
||||
|
||||
public void setIs_live(String is_live) {
|
||||
this.is_live = is_live;
|
||||
}
|
||||
|
||||
public String getIs_attention() {
|
||||
return is_attention;
|
||||
}
|
||||
|
||||
public void setIs_attention(String is_attention) {
|
||||
this.is_attention = is_attention;
|
||||
}
|
||||
|
||||
public String getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_id(String user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public String getTalk_name() {
|
||||
return talk_name;
|
||||
}
|
||||
|
||||
public void setTalk_name(String talk_name) {
|
||||
this.talk_name = talk_name;
|
||||
}
|
||||
|
||||
public String getIs_love() {
|
||||
return is_love;
|
||||
}
|
||||
|
||||
public void setIs_love(String is_love) {
|
||||
this.is_love = is_love;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel dest, int flags) {
|
||||
dest.writeString(id);
|
||||
dest.writeString(img_or_video);
|
||||
dest.writeString(img_json);
|
||||
dest.writeString(video);
|
||||
dest.writeString(content);
|
||||
dest.writeString(talk_id);
|
||||
dest.writeString(love_num);
|
||||
dest.writeString(comment_num);
|
||||
dest.writeString(share_num);
|
||||
dest.writeString(gift_num);
|
||||
dest.writeString(hot_num);
|
||||
dest.writeString(create_time);
|
||||
dest.writeString(ai_content);
|
||||
dest.writeString(is_delete);
|
||||
dest.writeString(user_name);
|
||||
dest.writeString(user_avatar);
|
||||
dest.writeString(is_anchor);
|
||||
dest.writeString(is_live);
|
||||
dest.writeString(is_attention);
|
||||
dest.writeString(user_id);
|
||||
dest.writeString(talk_name);
|
||||
dest.writeString(is_love);
|
||||
}
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HomeUserExhibitInfoBean extends BaseModel {
|
||||
public UserHomeTopInfo userHomeTopInfo;
|
||||
public List<GiftAlreadyWall> giftAlreadyWall;
|
||||
|
||||
public UserHomeTopInfo getUserHomeTopInfo() {
|
||||
return userHomeTopInfo;
|
||||
}
|
||||
|
||||
public void setUserHomeTopInfo(UserHomeTopInfo userHomeTopInfo) {
|
||||
this.userHomeTopInfo = userHomeTopInfo;
|
||||
}
|
||||
|
||||
|
||||
public class UserHomeTopInfo {
|
||||
Fans fans;
|
||||
|
||||
public Fans getFans() {
|
||||
return fans;
|
||||
}
|
||||
|
||||
public void setFans(Fans fans) {
|
||||
this.fans = fans;
|
||||
}
|
||||
|
||||
public class Fans {
|
||||
public List<AvatarList> list;
|
||||
public String fans_name;
|
||||
|
||||
public String getFans_name() {
|
||||
return fans_name;
|
||||
}
|
||||
|
||||
public void setFans_name(String fans_name) {
|
||||
this.fans_name = fans_name;
|
||||
}
|
||||
|
||||
public List<AvatarList> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void setList(List<AvatarList> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
public class AvatarList {
|
||||
String avatar;
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Guard {
|
||||
String avatar;
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
|
||||
public class Dress {
|
||||
String display_src;
|
||||
|
||||
public String getDisplay_src() {
|
||||
return display_src;
|
||||
}
|
||||
|
||||
public void setDisplay_src(String display_src) {
|
||||
this.display_src = display_src;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class GiftAlreadyWall {
|
||||
private String gift_wall_lighten_number;
|
||||
private String gift_wall_lighten_total;
|
||||
private List<GiftWall> gift_wall;
|
||||
|
||||
public String getGift_wall_lighten_number() {
|
||||
return gift_wall_lighten_number;
|
||||
}
|
||||
|
||||
public void setGift_wall_lighten_number(String gift_wall_lighten_number) {
|
||||
this.gift_wall_lighten_number = gift_wall_lighten_number;
|
||||
}
|
||||
|
||||
public String getGift_wall_lighten_total() {
|
||||
return gift_wall_lighten_total;
|
||||
}
|
||||
|
||||
public void setGift_wall_lighten_total(String gift_wall_lighten_total) {
|
||||
this.gift_wall_lighten_total = gift_wall_lighten_total;
|
||||
}
|
||||
|
||||
public List<GiftWall> getGift_wall() {
|
||||
return gift_wall;
|
||||
}
|
||||
|
||||
public void setGift_wall(List<GiftWall> gift_wall) {
|
||||
this.gift_wall = gift_wall;
|
||||
}
|
||||
|
||||
public class GiftWall {
|
||||
private String gifticon;
|
||||
|
||||
public String getGifticon() {
|
||||
return gifticon;
|
||||
}
|
||||
|
||||
public void setGifticon(String gifticon) {
|
||||
this.gifticon = gifticon;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,255 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class HomeUserInfoBean extends BaseModel {
|
||||
public UserHomeTopInfo userHomeTopInfo;
|
||||
public List<CheckBlack> checkBlack;
|
||||
|
||||
public UserHomeTopInfo getUserHomeTopInfo() {
|
||||
return userHomeTopInfo;
|
||||
}
|
||||
|
||||
public void setUserHomeTopInfo(UserHomeTopInfo userHomeTopInfo) {
|
||||
this.userHomeTopInfo = userHomeTopInfo;
|
||||
}
|
||||
|
||||
public List<CheckBlack> getCheckBlack() {
|
||||
return checkBlack;
|
||||
}
|
||||
|
||||
public void setCheckBlack(List<CheckBlack> checkBlack) {
|
||||
this.checkBlack = checkBlack;
|
||||
}
|
||||
|
||||
public class UserHomeTopInfo {
|
||||
private long user_id;
|
||||
private String user_name;
|
||||
private String user_avatar;
|
||||
private String user_signature;
|
||||
private int user_sex;
|
||||
private String user_level;
|
||||
private String user_level_anchor;
|
||||
private String user_goodnum;
|
||||
private String user_level_img;
|
||||
private String user_level_anchor_img;
|
||||
private String user_president_name;
|
||||
private int user_fans_num;
|
||||
private int user_love_num;
|
||||
private List<String> user_home_banner;
|
||||
private int is_live;
|
||||
private int is_anchor;
|
||||
private String fans_name;
|
||||
private int is_attention;
|
||||
private String user_avatar_frame;
|
||||
private List<String> cn_label;
|
||||
private List<String> en_label;
|
||||
|
||||
public List<String> getCn_label() {
|
||||
return cn_label;
|
||||
}
|
||||
|
||||
public void setCn_label(List<String> cn_label) {
|
||||
this.cn_label = cn_label;
|
||||
}
|
||||
|
||||
public List<String> getEn_label() {
|
||||
return en_label;
|
||||
}
|
||||
|
||||
public void setEn_label(List<String> en_label) {
|
||||
this.en_label = en_label;
|
||||
}
|
||||
|
||||
public void setUser_id(long user_id) {
|
||||
this.user_id = user_id;
|
||||
}
|
||||
|
||||
public long getUser_id() {
|
||||
return user_id;
|
||||
}
|
||||
|
||||
public void setUser_name(String user_name) {
|
||||
this.user_name = user_name;
|
||||
}
|
||||
|
||||
public String getUser_name() {
|
||||
return user_name;
|
||||
}
|
||||
|
||||
public void setUser_avatar(String user_avatar) {
|
||||
this.user_avatar = user_avatar;
|
||||
}
|
||||
|
||||
public String getUser_avatar() {
|
||||
return user_avatar;
|
||||
}
|
||||
|
||||
public void setUser_signature(String user_signature) {
|
||||
this.user_signature = user_signature;
|
||||
}
|
||||
|
||||
public String getUser_signature() {
|
||||
return user_signature;
|
||||
}
|
||||
|
||||
public void setUser_sex(int user_sex) {
|
||||
this.user_sex = user_sex;
|
||||
}
|
||||
|
||||
public int getUser_sex() {
|
||||
return user_sex;
|
||||
}
|
||||
|
||||
public void setUser_level(String user_level) {
|
||||
this.user_level = user_level;
|
||||
}
|
||||
|
||||
public String getUser_level() {
|
||||
return user_level;
|
||||
}
|
||||
|
||||
public void setUser_level_anchor(String user_level_anchor) {
|
||||
this.user_level_anchor = user_level_anchor;
|
||||
}
|
||||
|
||||
public String getUser_level_anchor() {
|
||||
return user_level_anchor;
|
||||
}
|
||||
|
||||
public void setUser_goodnum(String user_goodnum) {
|
||||
this.user_goodnum = user_goodnum;
|
||||
}
|
||||
|
||||
public String getUser_goodnum() {
|
||||
return user_goodnum;
|
||||
}
|
||||
|
||||
public void setUser_level_img(String user_level_img) {
|
||||
this.user_level_img = user_level_img;
|
||||
}
|
||||
|
||||
public String getUser_level_img() {
|
||||
return user_level_img;
|
||||
}
|
||||
|
||||
public void setUser_level_anchor_img(String user_level_anchor_img) {
|
||||
this.user_level_anchor_img = user_level_anchor_img;
|
||||
}
|
||||
|
||||
public String getUser_level_anchor_img() {
|
||||
return user_level_anchor_img;
|
||||
}
|
||||
|
||||
public void setUser_president_name(String user_president_name) {
|
||||
this.user_president_name = user_president_name;
|
||||
}
|
||||
|
||||
public String getUser_president_name() {
|
||||
return user_president_name;
|
||||
}
|
||||
|
||||
public void setUser_fans_num(int user_fans_num) {
|
||||
this.user_fans_num = user_fans_num;
|
||||
}
|
||||
|
||||
public int getUser_fans_num() {
|
||||
return user_fans_num;
|
||||
}
|
||||
|
||||
public void setUser_love_num(int user_love_num) {
|
||||
this.user_love_num = user_love_num;
|
||||
}
|
||||
|
||||
public int getUser_love_num() {
|
||||
return user_love_num;
|
||||
}
|
||||
|
||||
public void setUser_home_banner(List<String> user_home_banner) {
|
||||
this.user_home_banner = user_home_banner;
|
||||
}
|
||||
|
||||
public List<String> getUser_home_banner() {
|
||||
return user_home_banner;
|
||||
}
|
||||
|
||||
public void setIs_live(int is_live) {
|
||||
this.is_live = is_live;
|
||||
}
|
||||
|
||||
public int getIs_live() {
|
||||
return is_live;
|
||||
}
|
||||
|
||||
public void setIs_anchor(int is_anchor) {
|
||||
this.is_anchor = is_anchor;
|
||||
}
|
||||
|
||||
public int getIs_anchor() {
|
||||
return is_anchor;
|
||||
}
|
||||
|
||||
public void setFans_name(String fans_name) {
|
||||
this.fans_name = fans_name;
|
||||
}
|
||||
|
||||
public String getFans_name() {
|
||||
return fans_name;
|
||||
}
|
||||
|
||||
public void setIs_attention(int is_attention) {
|
||||
this.is_attention = is_attention;
|
||||
}
|
||||
|
||||
public int getIs_attention() {
|
||||
return is_attention;
|
||||
}
|
||||
|
||||
public void setUser_avatar_frame(String user_avatar_frame) {
|
||||
this.user_avatar_frame = user_avatar_frame;
|
||||
}
|
||||
|
||||
public String getUser_avatar_frame() {
|
||||
return user_avatar_frame;
|
||||
}
|
||||
}
|
||||
|
||||
public class CheckBlack {
|
||||
private String uidIsAuth;
|
||||
private String touidIsAuth;
|
||||
private String u2t;
|
||||
private String t2u;
|
||||
|
||||
public String getUidIsAuth() {
|
||||
return uidIsAuth;
|
||||
}
|
||||
|
||||
public void setUidIsAuth(String uidIsAuth) {
|
||||
this.uidIsAuth = uidIsAuth;
|
||||
}
|
||||
|
||||
public String getTouidIsAuth() {
|
||||
return touidIsAuth;
|
||||
}
|
||||
|
||||
public void setTouidIsAuth(String touidIsAuth) {
|
||||
this.touidIsAuth = touidIsAuth;
|
||||
}
|
||||
|
||||
public String getU2t() {
|
||||
return u2t;
|
||||
}
|
||||
|
||||
public void setU2t(String u2t) {
|
||||
this.u2t = u2t;
|
||||
}
|
||||
|
||||
public String getT2u() {
|
||||
return t2u;
|
||||
}
|
||||
|
||||
public void setT2u(String t2u) {
|
||||
this.t2u = t2u;
|
||||
}
|
||||
}
|
||||
}
|
128
common/src/main/java/com/yunbao/common/bean/LabelBean.java
Normal file
@ -0,0 +1,128 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LabelBean extends BaseModel {
|
||||
private int id;
|
||||
private int pid;
|
||||
private String cn_title;
|
||||
private String en_title;
|
||||
private List<Children> children;
|
||||
|
||||
public static class Children {
|
||||
private int id;
|
||||
private int pid;
|
||||
private String cn_title;
|
||||
private String en_title;
|
||||
private List<Children> children;
|
||||
|
||||
private boolean isSelect;
|
||||
|
||||
public boolean isSelect() {
|
||||
return isSelect;
|
||||
}
|
||||
|
||||
public void setSelect(boolean select) {
|
||||
isSelect = select;
|
||||
}
|
||||
|
||||
public Children() {
|
||||
|
||||
}
|
||||
|
||||
public Children(int id, String cn_title) {
|
||||
this.id = id;
|
||||
this.cn_title = cn_title;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(int pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getCn_title() {
|
||||
return cn_title;
|
||||
}
|
||||
|
||||
public void setCn_title(String cn_title) {
|
||||
this.cn_title = cn_title;
|
||||
}
|
||||
|
||||
public String getEn_title() {
|
||||
return en_title;
|
||||
}
|
||||
|
||||
public void setEn_title(String en_title) {
|
||||
this.en_title = en_title;
|
||||
}
|
||||
|
||||
public List<Children> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<Children> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(int pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getCn_title() {
|
||||
return cn_title;
|
||||
}
|
||||
|
||||
public void setCn_title(String cn_title) {
|
||||
this.cn_title = cn_title;
|
||||
}
|
||||
|
||||
public String getEn_title() {
|
||||
return en_title;
|
||||
}
|
||||
|
||||
public void setEn_title(String en_title) {
|
||||
this.en_title = en_title;
|
||||
}
|
||||
|
||||
public List<Children> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
|
||||
public List<String> getStringChildren() {
|
||||
List<String> stringList = new ArrayList<>();
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
stringList.add(children.get(i).getCn_title());
|
||||
}
|
||||
return stringList;
|
||||
}
|
||||
|
||||
public void setChildren(List<Children> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
package com.yunbao.common.dialog;
|
||||
|
||||
import android.animation.Animator;
|
||||
import android.animation.AnimatorListenerAdapter;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
import android.view.animation.AccelerateDecelerateInterpolator;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.yunbao.common.R;
|
||||
import com.yunbao.common.adapter.ImagePreviewAdapter;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
/**
|
||||
* Created by Martin on 2024/3/15.
|
||||
* 图片预览弹窗
|
||||
*/
|
||||
|
||||
public class ImagePreviewDialog extends AbsDialogFragment implements View.OnClickListener {
|
||||
|
||||
private View mBg;
|
||||
private RecyclerView mRecyclerView;
|
||||
private ValueAnimator mAnimator;
|
||||
private int mPosition;
|
||||
private int mPageCount;
|
||||
private ActionListener mActionListener;
|
||||
private TextView mCount;
|
||||
private ImagePreviewAdapter mAdapter;
|
||||
private boolean mNeedDelete;
|
||||
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
return R.layout.view_preview_image;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getDialogStyle() {
|
||||
return R.style.dialog2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canCancel() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setWindowAttributes(Window window) {
|
||||
WindowManager.LayoutParams params = window.getAttributes();
|
||||
params.width = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
params.height = WindowManager.LayoutParams.MATCH_PARENT;
|
||||
window.setAttributes(params);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
mBg = mRootView.findViewById(R.id.bg);
|
||||
mCount = (TextView) findViewById(R.id.count);
|
||||
findViewById(R.id.btn_close).setOnClickListener(this);
|
||||
if (mNeedDelete) {
|
||||
View btnDelete = findViewById(R.id.btn_delete);
|
||||
btnDelete.setVisibility(View.VISIBLE);
|
||||
btnDelete.setOnClickListener(this);
|
||||
}
|
||||
mRecyclerView = mRootView.findViewById(R.id.recyclerView);
|
||||
mRecyclerView.setHasFixedSize(true);
|
||||
mRecyclerView.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
mAnimator = ValueAnimator.ofFloat(0, 1);
|
||||
mAnimator.setDuration(150);
|
||||
mAnimator.setInterpolator(new AccelerateDecelerateInterpolator());
|
||||
mAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
|
||||
@Override
|
||||
public void onAnimationUpdate(ValueAnimator animation) {
|
||||
float v = (float) animation.getAnimatedValue();
|
||||
mBg.setAlpha(v);
|
||||
}
|
||||
});
|
||||
mAnimator.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
if (mRecyclerView != null && mPageCount > 0) {
|
||||
ImagePreviewAdapter adapter = new ImagePreviewAdapter(mContext, mPageCount);
|
||||
mAdapter = adapter;
|
||||
adapter.setActionListener(new ImagePreviewAdapter.ActionListener() {
|
||||
@Override
|
||||
public void onPageChanged(int position) {
|
||||
if (mCount != null) {
|
||||
mCount.setText(StringUtil.contact(String.valueOf(position + 1), "/", String.valueOf(mPageCount)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadImage(ImageView imageView, int position) {
|
||||
if (mActionListener != null) {
|
||||
mActionListener.loadImage(imageView, position);
|
||||
}
|
||||
}
|
||||
});
|
||||
mRecyclerView.setAdapter(adapter);
|
||||
if (mPosition >= 0 && mPosition < mPageCount) {
|
||||
adapter.setCurPosition(mPosition);
|
||||
mRecyclerView.scrollToPosition(mPosition);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
mAnimator.start();
|
||||
}
|
||||
|
||||
public void setImageInfo(int pageCount, int position, boolean needDelete, ActionListener actionListener) {
|
||||
mActionListener = actionListener;
|
||||
mPageCount = pageCount;
|
||||
mPosition = position;
|
||||
mNeedDelete = needDelete;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
if (mAnimator != null) {
|
||||
mAnimator.cancel();
|
||||
}
|
||||
mContext = null;
|
||||
mActionListener = null;
|
||||
super.onDestroy();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
int i = v.getId();
|
||||
if (i == R.id.btn_close) {
|
||||
dismiss();
|
||||
} else if (i == R.id.btn_delete) {
|
||||
delete();
|
||||
}
|
||||
}
|
||||
|
||||
private void delete() {
|
||||
if (mAdapter != null && mActionListener != null) {
|
||||
mActionListener.onDeleteClick(mAdapter.getCurPosition());
|
||||
}
|
||||
dismiss();
|
||||
}
|
||||
|
||||
public interface ActionListener {
|
||||
void loadImage(ImageView imageView, int position);
|
||||
|
||||
void onDeleteClick(int position);
|
||||
}
|
||||
|
||||
}
|
@ -527,7 +527,6 @@ public class CommonHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取动态列表-热门
|
||||
*
|
||||
@ -593,7 +592,6 @@ public class CommonHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取动态-分类
|
||||
*/
|
||||
@ -609,6 +607,39 @@ public class CommonHttpUtil {
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
public static void getOtherDynamicList(String toUid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Pdlcommunity.getOtherDynamicList", "Pdlcommunity.getOtherDynamicList")
|
||||
.params("tuid", toUid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态-删除
|
||||
*/
|
||||
public static void delCom(String comment_id, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Pdlcommunity.delComment", "Pdlcommunity.delComment")
|
||||
.params("comment_id", comment_id)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态-不感兴趣
|
||||
*/
|
||||
public static void noInterest(String uid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("User.setBlack", "User.setBlack")
|
||||
.params("touid", uid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户主页-用户数据
|
||||
*/
|
||||
public static void getUserInfoTop(String uid, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Pdluserhome.getUserHomeTopInfo", "Pdluserhome.getUserHomeTopInfo")
|
||||
.params("select_uid", uid)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,8 @@ import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.HomeUserExhibitInfoBean;
|
||||
import com.yunbao.common.bean.HomeUserInfoBean;
|
||||
import com.yunbao.common.bean.HourRank;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.IMLoginModel;
|
||||
@ -1178,4 +1180,8 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<MessageUserInfoBean>> getOtherInfo(@Query("tuid") String tuid);
|
||||
@GET("/api/public/?service=Userhome.getUserHomeBanner")
|
||||
Observable<ResponseModel<List<String>>> getUserHomeBanner(@Query("select_uid") String tuid);
|
||||
@GET("/api/public/?service=Pdluserhome.getUserHomeTopInfo")
|
||||
Observable<ResponseModel<HomeUserInfoBean>> getUserHomeInfo(@Query("select_uid") String tuid);
|
||||
@GET("/api/public/?service=Pdluserhome.getUserHomeInfo")
|
||||
Observable<ResponseModel<HomeUserExhibitInfoBean>> getUserHomeExhibitInfo(@Query("select_uid") String tuid);
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ import com.yunbao.common.bean.GiftGuideModel;
|
||||
import com.yunbao.common.bean.GiftNamingInfoModel;
|
||||
import com.yunbao.common.bean.GiftWallGiftDetail;
|
||||
import com.yunbao.common.bean.GiftWallModel;
|
||||
import com.yunbao.common.bean.HomeUserExhibitInfoBean;
|
||||
import com.yunbao.common.bean.HomeUserInfoBean;
|
||||
import com.yunbao.common.bean.HttpCallbackModel;
|
||||
import com.yunbao.common.bean.LinkMicUserBean;
|
||||
import com.yunbao.common.bean.LinkMicUserBeanV2;
|
||||
@ -2959,9 +2961,12 @@ public class LiveNetManager {
|
||||
.getOtherInfo(touid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(roomMicStatusModelResponseModel -> {
|
||||
.subscribe(new Consumer<ResponseModel<MessageUserInfoBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<MessageUserInfoBean> messageUserInfoBeanResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(roomMicStatusModelResponseModel.getData().getInfo());
|
||||
callback.onSuccess(messageUserInfoBeanResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
@ -3034,7 +3039,7 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getUserHomeBanner(String search,HttpCallback<List<String>> callback) {
|
||||
public void getUserHomeBanner(String search, HttpCallback<List<String>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getUserHomeBanner(search)
|
||||
.subscribeOn(Schedulers.io())
|
||||
@ -3054,6 +3059,53 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getUserHomeInfo(String touid, HttpCallback<HomeUserInfoBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getUserHomeInfo(touid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<HomeUserInfoBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<HomeUserInfoBean> messageUserInfoBeanResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(messageUserInfoBeanResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getUserExhibitInfoInfo(String touid, HttpCallback<HomeUserExhibitInfoBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getUserHomeExhibitInfo(touid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<HomeUserExhibitInfoBean>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<HomeUserExhibitInfoBean> messageUserInfoBeanResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(messageUserInfoBeanResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
throwable.printStackTrace();
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
12
common/src/main/res/drawable/bg_flow_tag.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#FFF6E8" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="20dp"
|
||||
android:bottomRightRadius="20dp"
|
||||
android:topLeftRadius="20dp"
|
||||
android:topRightRadius="20dp" />
|
||||
|
||||
</shape>
|
12
common/src/main/res/drawable/bg_user_home_04.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<solid android:color="#E5ECFF" />
|
||||
|
||||
<corners
|
||||
android:bottomLeftRadius="10dp"
|
||||
android:bottomRightRadius="10dp"
|
||||
android:topLeftRadius="10dp"
|
||||
android:topRightRadius="10dp" />
|
||||
|
||||
</shape>
|
148
common/src/main/res/layout/activity_user_community_item.xml
Normal file
@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/transparent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/userLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:src="@mipmap/icon_data_empty"
|
||||
app:riv_oval="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="栗子栗子🌰zzz"
|
||||
android:textColor="#333333"
|
||||
android:textSize="13dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="02 - 11发布"
|
||||
android:textColor="#777777"
|
||||
android:textSize="11dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:text=""
|
||||
android:textColor="#333333" />
|
||||
|
||||
<com.yunbao.common.views.NineGridLayout
|
||||
android:id="@+id/nine_grid_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:layout_marginTop="15dp"
|
||||
app:ngl_corner_radius="5dp"
|
||||
app:ngl_divider_width="6dp"
|
||||
app:ngl_space="30dp" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/videoLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/videoImage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="400dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@mipmap/icon_play" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iconLike"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:padding="4dp"
|
||||
android:src="@mipmap/icon_com_like" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/likeCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="0"
|
||||
android:textSize="11dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/comIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:padding="4dp"
|
||||
android:src="@mipmap/icon_com_com" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="0"
|
||||
android:textSize="11dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/shareIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:padding="4dp"
|
||||
android:src="@mipmap/icon_com_share" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shareCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:text="0"
|
||||
android:textSize="11dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.yunbao.common.views.MyScrollview xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -41,9 +41,10 @@
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/imgsRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="80dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="35dp" />
|
||||
android:layout_marginBottom="35dp"
|
||||
android:paddingStart="10dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@ -62,6 +63,7 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:scaleType="centerCrop"
|
||||
@ -81,28 +83,15 @@
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:text="主播昵称"
|
||||
android:text=""
|
||||
android:textColor="#333333"
|
||||
android:textSize="20dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@mipmap/icon_auth_suc" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="真人认证"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
@ -119,9 +108,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/fansCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10.99w"
|
||||
android:text=""
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp"
|
||||
android:textStyle="bold" />
|
||||
@ -144,9 +134,10 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/likeCount"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="10.99w"
|
||||
android:text=""
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp"
|
||||
android:textStyle="bold" />
|
||||
@ -167,18 +158,21 @@
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/followLayout"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_height="35dp"
|
||||
android:background="@drawable/bg_main_com_type"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/followIcon"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@mipmap/icon_like_follow" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/followName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
@ -195,26 +189,32 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userId"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="ID:123456"
|
||||
android:text="ID:"
|
||||
android:textColor="#777777"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userStatus"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="在线"
|
||||
android:textColor="#777777"
|
||||
android:textSize="10dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/userStatusIcon"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_gravity="top"
|
||||
android:layout_marginStart="2dp"
|
||||
android:src="@mipmap/icon_green" />
|
||||
|
||||
@ -222,7 +222,7 @@
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="30dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
@ -231,76 +231,422 @@
|
||||
android:id="@+id/user_sex"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@mipmap/icon_man" />
|
||||
android:src="@mipmap/icon_wumen" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/authorLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/authorlIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/icon_grade" />
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Lv 42"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12dp" />
|
||||
android:textSize="12dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/levelLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center_vertical">
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/levelIcon"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/icon_vip_grade" />
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/level"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="27dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="Lv 42"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/userPresidentLayout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/icon_trade_union" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/userPresidentName"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="27dp"
|
||||
android:gravity="center_vertical"
|
||||
android:text="工会"
|
||||
android:textColor="#F65BBB"
|
||||
android:textSize="12dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
<LinearLayout
|
||||
android:id="@+id/authenticationLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@color/gray1" />
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical"
|
||||
android:visibility="gone">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:src="@mipmap/icon_auth_suc" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="真人认证"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.xuexiang.xui.widget.flowlayout.FlowTagLayout
|
||||
android:id="@+id/myFlowTag"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
app:ftl_check_mode="none" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/signature"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名个性签名"
|
||||
android:text=""
|
||||
android:textColor="#777777"
|
||||
android:textSize="12dp" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemLayout01"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@mipmap/bg_user_home_01"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="主播粉絲團"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="粉絲團名稱"
|
||||
android:textColor="#777777"
|
||||
android:textSize="14dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical|right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/img_no1" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/fansImg1"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/img_no2" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/fansImg2"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/img_no3" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/fansImg3"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/icon_gray_new_right" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemLayout02"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@mipmap/bg_user_home_02"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="主播守護團"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical|right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@mipmap/img_no1" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/img_no2" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/img_no3" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/icon_gray_new_right" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemLayout03"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_user_home_04"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="礼物墙"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:text="0/36"
|
||||
android:textColor="#777777"
|
||||
android:textSize="14dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical|right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="5dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="5dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/icon_gray_new_right" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemLayout04"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="70dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@mipmap/bg_user_home_03"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="20dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="榮譽墻"
|
||||
android:textColor="#333333"
|
||||
android:textSize="12dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center_vertical|right"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="5dp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/img_honor_default" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:src="@mipmap/icon_gray_new_right" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/moreLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:gravity="center">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/moreText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="查看更多"
|
||||
@ -309,12 +655,20 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/moreIcon"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:src="@mipmap/icon_down" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
@ -324,13 +678,13 @@
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="3dp"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:src="@mipmap/icon_index_new" />
|
||||
|
||||
<TextView
|
||||
@ -343,19 +697,20 @@
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/communityRecyclerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/appBarLayout"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="500dp"
|
||||
android:layout_below="@id/appBarLayout"
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/topLayout"
|
||||
android:layout_width="match_parent"
|
||||
@ -385,6 +740,7 @@
|
||||
android:visibility="invisible" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/setting"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:src="@mipmap/icon_right_gray" />
|
||||
@ -392,4 +748,4 @@
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</com.yunbao.common.views.MyScrollview>
|
21
common/src/main/res/layout/adapter_item_tag.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_tag"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/bg_flow_tag"
|
||||
android:paddingStart="15dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingEnd="15dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:text="标签"
|
||||
android:textColor="@color/black2" />
|
||||
|
||||
</LinearLayout>
|
@ -4,13 +4,13 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:background="@drawable/bg_item_comment"
|
||||
android:orientation="vertical">
|
||||
|
||||
@ -38,6 +38,7 @@
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
@ -50,6 +51,32 @@
|
||||
android:textSize="12dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="删除"
|
||||
android:textColor="#777777"
|
||||
android:textSize="11dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/report"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:padding="10dp"
|
||||
android:text="举报"
|
||||
android:textColor="#333333"
|
||||
android:textSize="11dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
@ -71,4 +98,5 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
@ -21,11 +21,10 @@
|
||||
app:riv_oval="true" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
@ -48,6 +47,36 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="17dp"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:background="@drawable/bg_main_com_author"
|
||||
android:gravity="center"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:text="作者"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="10dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/del"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="10dp"
|
||||
android:padding="10dp"
|
||||
android:text="删除"
|
||||
android:textColor="#777777"
|
||||
android:textSize="11dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/replyTextView"
|
||||
android:layout_width="wrap_content"
|
||||
@ -121,6 +150,32 @@
|
||||
android:textSize="11dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/del1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:text="删除"
|
||||
android:textColor="#777777"
|
||||
android:textSize="11dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/report1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:padding="10dp"
|
||||
android:text="举报"
|
||||
android:textColor="#333333"
|
||||
android:textSize="11dp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
8
common/src/main/res/layout/item_preview_img.xml
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ImageView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:background="#000"
|
||||
/>
|
@ -2,17 +2,27 @@
|
||||
<LinearLayout 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"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="100dp"
|
||||
android:id="@+id/itemLayout"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="70dp"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="MissingDefaultResource">
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar"
|
||||
android:id="@+id/avatar01"
|
||||
android:layout_width="42dp"
|
||||
android:layout_height="42dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_data_empty"
|
||||
app:riv_corner_radius="15dp" />
|
||||
|
||||
<com.makeramen.roundedimageview.RoundedImageView
|
||||
android:id="@+id/avatar02"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@mipmap/icon_data_empty"
|
||||
app:riv_oval="true" />
|
||||
|
||||
android:visibility="gone"
|
||||
app:riv_corner_radius="15dp" />
|
||||
</LinearLayout>
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@ -31,7 +32,7 @@
|
||||
android:layout_gravity="center_vertical"
|
||||
android:padding="9dp"
|
||||
android:src="@mipmap/icon_back"
|
||||
android:tint="@color/white" />
|
||||
app:tint="@color/white" />
|
||||
|
||||
|
||||
<TextView
|
||||
|
@ -83,9 +83,8 @@
|
||||
android:paddingTop="10dp"
|
||||
android:paddingRight="15dp"
|
||||
android:paddingBottom="10dp"
|
||||
android:text="发布"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16dp"
|
||||
android:visibility="visible" />
|
||||
android:visibility="gone" />
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
||||
|
BIN
common/src/main/res/mipmap-mdpi/bg_user_home_01.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
common/src/main/res/mipmap-mdpi/bg_user_home_02.png
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
common/src/main/res/mipmap-mdpi/bg_user_home_03.png
Normal file
After Width: | Height: | Size: 163 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_com_com.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_com_like.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_com_share.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_gray_new_right.png
Normal file
After Width: | Height: | Size: 647 B |
BIN
common/src/main/res/mipmap-mdpi/icon_man_new.png
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_trade_union.png
Normal file
After Width: | Height: | Size: 4.8 KiB |
BIN
common/src/main/res/mipmap-mdpi/icon_up.png
Normal file
After Width: | Height: | Size: 1001 B |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
common/src/main/res/mipmap-mdpi/img_honor_default.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
common/src/main/res/mipmap-mdpi/img_no1.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-mdpi/img_no2.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
common/src/main/res/mipmap-mdpi/img_no3.png
Normal file
After Width: | Height: | Size: 12 KiB |
@ -1133,10 +1133,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
||||
mainHomeComViewHolder = new MainHomeComViewHolder(mContext, parent);
|
||||
vh = mainHomeComViewHolder;
|
||||
} else if (position == 1) {
|
||||
mainHomeLiveViewHolder = new MainHomeLiveViewHolder(mContext, parent);//直播
|
||||
vh = mainHomeLiveViewHolder;
|
||||
/* mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//直播
|
||||
vh = mMainHomeCommunityViewHolder;*/
|
||||
/* mainHomeLiveViewHolder = new MainHomeLiveViewHolder(mContext, parent);//直播
|
||||
vh = mainHomeLiveViewHolder;*/
|
||||
mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//直播
|
||||
vh = mMainHomeCommunityViewHolder;
|
||||
} else if (position == 2) {
|
||||
mainMessageViewHolder = new MainMessageViewHolder(this, parent);
|
||||
vh = mainMessageViewHolder;
|
||||
|