修复bug

This commit is contained in:
hch 2024-03-25 13:07:15 +08:00
parent dd582c10c7
commit 28f00f1c8a
5 changed files with 46 additions and 23 deletions

View File

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

View File

@ -28,12 +28,29 @@
android:gravity="center_vertical"
android:orientation="horizontal">
<com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar"
<RelativeLayout
android:layout_width="68dp"
android:layout_height="68dp"
android:src="@mipmap/icon_data_empty"
app:riv_corner_radius="20dp" />
android:layout_height="80dp">
<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
android:layout_width="0dp"

View File

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

View File

@ -48,6 +48,8 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import pl.droidsonroids.gif.GifImageView;
@Route(path = RouteUtil.PATH_COMMUNITY)
public class CommunityDetailsActivity extends AbsActivity {
private ActiveBean activeBean;
@ -71,6 +73,7 @@ public class CommunityDetailsActivity extends AbsActivity {
private ImageView send;
private boolean isComment = false;
private RelativeLayout videoLayout;
private GifImageView liveStatus;
@Override
protected int getLayoutId() {
@ -97,6 +100,7 @@ public class CommunityDetailsActivity extends AbsActivity {
}
private void initView() {
liveStatus = findViewById(R.id.liveStatus);
videoLayout = findViewById(R.id.videoLayout);
send = findViewById(R.id.send);
comment = findViewById(R.id.comment);
@ -248,23 +252,10 @@ public class CommunityDetailsActivity extends AbsActivity {
if (!jsonArray.isEmpty()) {
image = jsonArray.getString(0);
}
}else{
image=activeBean.getVideo() + "?vframe/jpg/offset/0";
} else {
image = activeBean.getVideo() + "?vframe/jpg/offset/0";
}
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();
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();
});
}
@ -363,6 +354,9 @@ public class CommunityDetailsActivity extends AbsActivity {
if (!StringUtil.isEmpty(activeBean.getContent())) {
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")) {//关注
ImgLoader.display(CommunityDetailsActivity.this, R.mipmap.icon_like_followed, followIcon);
followName.setText(getResources().getString(R.string.following));

View File

@ -246,6 +246,17 @@ public class UserHomeActivity extends AbsActivity {
authorIcon.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());//个性签名
//标签
myAdapter = new LabelTagAdapter(mContext, new LabelTagAdapter.OnSureOnClickListener() {
@ -541,7 +552,7 @@ public class UserHomeActivity extends AbsActivity {
public void onClick(View v) {
if (bannerImgList.size() < 9) {
selectImg();
}else{
} else {
ToastUtil.show(getResources().getString(com.yunbao.main.R.string._9));
}
}