Merge remote-tracking branch 'origin/dev_改版主分支' into dev_改版主分支

This commit is contained in:
zlzw 2024-03-25 13:07:34 +08:00
commit 253fe38067
5 changed files with 46 additions and 23 deletions

View File

@ -147,7 +147,6 @@ public class CommentAdapter extends RecyclerView.Adapter {
del1.setTag(bean); del1.setTag(bean);
report.setTag(bean); report.setTag(bean);
replyTextView.setTag(bean); replyTextView.setTag(bean);
report1.setTag(bean);
ImgLoader.display(itemView.getContext(), bean.getUser_avatar(), mAvatar); ImgLoader.display(itemView.getContext(), bean.getUser_avatar(), mAvatar);
name.setText(bean.getUser_name()); name.setText(bean.getUser_name());
content.setText(bean.getContent()); content.setText(bean.getContent());
@ -164,6 +163,7 @@ public class CommentAdapter extends RecyclerView.Adapter {
if (bean.getReplyCommentList() != null) { if (bean.getReplyCommentList() != null) {
replyCount.setText("" + bean.getReplyCommentList().size() + "条回复>"); replyCount.setText("" + bean.getReplyCommentList().size() + "条回复>");
if (bean.getReplyCommentList().size() > 0) { if (bean.getReplyCommentList().size() > 0) {
report1.setTag(bean.getReplyCommentList().get(0));
del1.setTag(bean.getReplyCommentList().get(0)); del1.setTag(bean.getReplyCommentList().get(0));
replyContent.setText(bean.getReplyCommentList().get(0).getContent()); replyContent.setText(bean.getReplyCommentList().get(0).getContent());
ImgLoader.display(itemView.getContext(), bean.getReplyCommentList().get(0).getUser_avatar(), mAvatar01); ImgLoader.display(itemView.getContext(), bean.getReplyCommentList().get(0).getUser_avatar(), mAvatar01);

View File

@ -28,12 +28,29 @@
android:gravity="center_vertical" android:gravity="center_vertical"
android:orientation="horizontal"> android:orientation="horizontal">
<com.makeramen.roundedimageview.RoundedImageView <RelativeLayout
android:id="@+id/avatar"
android:layout_width="68dp" android:layout_width="68dp"
android:layout_height="68dp" android:layout_height="80dp">
android:src="@mipmap/icon_data_empty"
app:riv_corner_radius="20dp" /> <com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
android:layout_width="70dp"
android:layout_height="70dp"
android:padding="1dp"
android:scaleType="centerCrop"
app:riv_oval="true" />
<pl.droidsonroids.gif.GifImageView
android:id="@+id/liveStatus"
android:layout_width="wrap_content"
android:layout_height="20dp"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="3dp"
android:src="@mipmap/icon_liveing"
android:visibility="gone" />
</RelativeLayout>
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"

View File

@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/bg_item_comment"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="20dp" android:paddingLeft="20dp"
android:paddingRight="10dp" android:paddingRight="10dp"

View File

@ -48,6 +48,8 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import pl.droidsonroids.gif.GifImageView;
@Route(path = RouteUtil.PATH_COMMUNITY) @Route(path = RouteUtil.PATH_COMMUNITY)
public class CommunityDetailsActivity extends AbsActivity { public class CommunityDetailsActivity extends AbsActivity {
private ActiveBean activeBean; private ActiveBean activeBean;
@ -71,6 +73,7 @@ public class CommunityDetailsActivity extends AbsActivity {
private ImageView send; private ImageView send;
private boolean isComment = false; private boolean isComment = false;
private RelativeLayout videoLayout; private RelativeLayout videoLayout;
private GifImageView liveStatus;
@Override @Override
protected int getLayoutId() { protected int getLayoutId() {
@ -97,6 +100,7 @@ public class CommunityDetailsActivity extends AbsActivity {
} }
private void initView() { private void initView() {
liveStatus = findViewById(R.id.liveStatus);
videoLayout = findViewById(R.id.videoLayout); videoLayout = findViewById(R.id.videoLayout);
send = findViewById(R.id.send); send = findViewById(R.id.send);
comment = findViewById(R.id.comment); comment = findViewById(R.id.comment);
@ -248,23 +252,10 @@ public class CommunityDetailsActivity extends AbsActivity {
if (!jsonArray.isEmpty()) { if (!jsonArray.isEmpty()) {
image = jsonArray.getString(0); image = jsonArray.getString(0);
} }
}else{ } else {
image=activeBean.getVideo() + "?vframe/jpg/offset/0"; image = activeBean.getVideo() + "?vframe/jpg/offset/0";
} }
new SharePopDialog(mContext) new SharePopDialog(mContext).setShareType(SharePopDialog.TYPE_DYNAMIC).setShareData(ShareBean.ShareBuilder.create().setShareType(SharePopDialog.TYPE_DYNAMIC).setUid(CommonAppConfig.getInstance().getUid()).setCover(StringUtil.isEmpty(image) ? activeBean.getUser_avatar() : image).setTitle(StringUtil.isEmpty(activeBean.getContent()) ? activeBean.getUser_name() : JSONObject.parseObject(activeBean.getContent()).getString("msg")).setAnchorId(activeBean.getUser_id()).setAnchorName(activeBean.getUser_name()).setAnchorAvatar(activeBean.getUser_avatar()).setExtraData(activeId).build()).showDialog();
.setShareType(SharePopDialog.TYPE_DYNAMIC)
.setShareData(ShareBean.ShareBuilder.create()
.setShareType(SharePopDialog.TYPE_DYNAMIC)
.setUid(CommonAppConfig.getInstance().getUid())
.setCover(StringUtil.isEmpty(image) ? activeBean.getUser_avatar() : image)
.setTitle(StringUtil.isEmpty(activeBean.getContent()) ? activeBean.getUser_name() : JSONObject.parseObject(activeBean.getContent()).getString("msg"))
.setAnchorId(activeBean.getUser_id())
.setAnchorName(activeBean.getUser_name())
.setAnchorAvatar(activeBean.getUser_avatar())
.setExtraData(activeId)
.build()
)
.showDialog();
}); });
} }
@ -363,6 +354,9 @@ public class CommunityDetailsActivity extends AbsActivity {
if (!StringUtil.isEmpty(activeBean.getContent())) { if (!StringUtil.isEmpty(activeBean.getContent())) {
content.setText(String.valueOf(JSONObject.parseObject(activeBean.getContent()).get("msg"))); content.setText(String.valueOf(JSONObject.parseObject(activeBean.getContent()).get("msg")));
} }
if (activeBean.getIs_live().equals("1")) {
liveStatus.setVisibility(View.VISIBLE);
}
if (activeBean.getIs_attention().equals("1")) {//关注 if (activeBean.getIs_attention().equals("1")) {//关注
ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_followed, followIcon); ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_followed, followIcon);
followName.setText(getResources().getString(R.string.following)); followName.setText(getResources().getString(R.string.following));

View File

@ -246,6 +246,17 @@ public class UserHomeActivity extends AbsActivity {
authorIcon.setVisibility(View.GONE); authorIcon.setVisibility(View.GONE);
authenticationLayout.setVisibility(View.GONE); authenticationLayout.setVisibility(View.GONE);
} }
if (userInfo.getUserHomeTopInfo().getIs_attention() == 1) {
ImgLoader.display(UserHomeActivity.this, R.mipmap.icon_like_followed, followIcon);
followName.setText(getResources().getString(R.string.following));
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(getResources().getString(R.string.follow));
followName.setTextColor(getResources().getColor(R.color.white));
followLayout.setBackground(getResources().getDrawable(R.drawable.bg_main_com_type));
}
signature.setText(userInfo.getUserHomeTopInfo().getUser_signature());//个性签名 signature.setText(userInfo.getUserHomeTopInfo().getUser_signature());//个性签名
//标签 //标签
myAdapter = new LabelTagAdapter(mContext, new LabelTagAdapter.OnSureOnClickListener() { myAdapter = new LabelTagAdapter(mContext, new LabelTagAdapter.OnSureOnClickListener() {
@ -541,7 +552,7 @@ public class UserHomeActivity extends AbsActivity {
public void onClick(View v) { public void onClick(View v) {
if (bannerImgList.size() < 9) { if (bannerImgList.size() < 9) {
selectImg(); selectImg();
}else{ } else {
ToastUtil.show(getResources().getString(com.yunbao.main.R.string._9)); ToastUtil.show(getResources().getString(com.yunbao.main.R.string._9));
} }
} }