Merge remote-tracking branch 'origin/dev_改版主分支-升级融云SDK&AGP8' into dev_改版主分支-升级融云SDK&AGP8
This commit is contained in:
@@ -30,14 +30,16 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||
private List<ActiveOtherBean> commentBeanList;
|
||||
private Context mContext;
|
||||
private onItemClickListener onItemClickListener;
|
||||
private boolean isMe;
|
||||
|
||||
public void setOnItemClickListener(UserCommunityAdapter.onItemClickListener onItemClickListener) {
|
||||
this.onItemClickListener = onItemClickListener;
|
||||
}
|
||||
|
||||
public UserCommunityAdapter(Context content, List<ActiveOtherBean> commentBeanList) {
|
||||
public UserCommunityAdapter(Context content, List<ActiveOtherBean> commentBeanList, boolean isMe) {
|
||||
this.mContext = content;
|
||||
this.commentBeanList = commentBeanList;
|
||||
this.isMe = isMe;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -69,6 +71,7 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||
private TextView likeCount;
|
||||
private TextView comCount;
|
||||
private TextView shareCount;
|
||||
private ImageView more_del;
|
||||
|
||||
public CommentViewHolder(@NonNull View itemView) {
|
||||
super(itemView);
|
||||
@@ -82,11 +85,21 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||
likeCount = itemView.findViewById(R.id.likeCount);
|
||||
comCount = itemView.findViewById(R.id.comCount);
|
||||
shareCount = itemView.findViewById(R.id.shareCount);
|
||||
|
||||
more_del = itemView.findViewById(R.id.more_del);
|
||||
more_del.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onItemMore((ActiveOtherBean) v.getTag(), getPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
onItemClickListener.onImgItem((ActiveOtherBean) v.getTag(), getPosition());
|
||||
if (onItemClickListener != null) {
|
||||
onItemClickListener.onImgItem((ActiveOtherBean) v.getTag(), getPosition());
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -95,6 +108,10 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||
public void setData(ActiveOtherBean bean) {
|
||||
itemView.setTag(bean);
|
||||
mAvatar.setTag(bean);
|
||||
more_del.setTag(bean);
|
||||
if (isMe) {
|
||||
more_del.setVisibility(View.VISIBLE);
|
||||
}
|
||||
ImgLoader.display(mContext, bean.getUser_avatar(), mAvatar);
|
||||
userName.setText(bean.getUser_name());
|
||||
time.setText(bean.getCreate_time());
|
||||
@@ -146,6 +163,6 @@ public class UserCommunityAdapter extends RecyclerView.Adapter {
|
||||
public interface onItemClickListener {
|
||||
void onImgItem(ActiveOtherBean activeBean, int position);
|
||||
|
||||
void onVideoItem(String activeBean, int position);
|
||||
void onItemMore(ActiveOtherBean activeBean, int position);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +606,7 @@ public class CommonHttpUtil {
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态-删除
|
||||
* 动态-评论-删除
|
||||
*/
|
||||
public static void delCom(String comment_id, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Pdlcommunity.delComment", "Pdlcommunity.delComment")
|
||||
@@ -651,6 +651,15 @@ public class CommonHttpUtil {
|
||||
.params("home_banner_url_ary", imgs)
|
||||
.execute(callback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 动态-删除
|
||||
*/
|
||||
public static void delActive(String dynamic_id, HttpCallback callback) {
|
||||
HttpClient.getInstance().get("Pdlcommunity.delDynamic", "Pdlcommunity.delDynamic")
|
||||
.params("dynamic_id", dynamic_id)
|
||||
.execute(callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,8 +10,10 @@ import com.yunbao.common.bean.BannerBean;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
|
||||
public class UserHomeImgsViewHolder implements BannerViewHolder<String> {
|
||||
public onCLickListener onCLickListener;
|
||||
|
||||
@Override
|
||||
|
||||
public View createView(Context context, int position, String data) {
|
||||
// 返回mImageView页面布局
|
||||
ImageView imageView = new ImageView(context);
|
||||
@@ -22,8 +24,24 @@ public class UserHomeImgsViewHolder implements BannerViewHolder<String> {
|
||||
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
|
||||
//Glide.with(context).load(data.getImageUrl()).into(imageView);
|
||||
ImgLoader.display(context, data, imageView);
|
||||
imageView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (onCLickListener != null) {
|
||||
onCLickListener.OnClick(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return imageView;
|
||||
}
|
||||
|
||||
public void setOnCLickListener(UserHomeImgsViewHolder.onCLickListener onCLickListener) {
|
||||
this.onCLickListener = onCLickListener;
|
||||
}
|
||||
|
||||
public interface onCLickListener {
|
||||
void OnClick(int position);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -49,6 +49,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/more_del"
|
||||
android:layout_width="30dp"
|
||||
android:layout_height="30dp"
|
||||
android:padding="4dp"
|
||||
android:src="@mipmap/icon_active_more"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
|
||||
BIN
common/src/main/res/mipmap-mdpi/icon_active_more.png
Normal file
BIN
common/src/main/res/mipmap-mdpi/icon_active_more.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 527 B |
@@ -28,4 +28,5 @@
|
||||
<string name="see_more">See more</string>
|
||||
<string name="close">close</string>
|
||||
<string name="time_cannot_be_greater_than_the_current_time">Time cannot be greater than the current time</string>
|
||||
<string name="msg_del_sure">Do you confirm deletion?</string>
|
||||
</resources>
|
||||
@@ -1493,4 +1493,5 @@
|
||||
<string name="see_more">查看更多</string>
|
||||
<string name="close">收起</string>
|
||||
<string name="time_cannot_be_greater_than_the_current_time">时间不能大于当前时间</string>
|
||||
<string name="msg_del_sure">是否確認刪除?</string>
|
||||
</resources>
|
||||
|
||||
@@ -1493,4 +1493,5 @@
|
||||
<string name="see_more">查看更多</string>
|
||||
<string name="close">收起</string>
|
||||
<string name="time_cannot_be_greater_than_the_current_time">时间不能大于当前时间</string>
|
||||
<string name="msg_del_sure">是否確認刪除?</string>
|
||||
</resources>
|
||||
|
||||
@@ -1491,4 +1491,5 @@
|
||||
<string name="see_more">查看更多</string>
|
||||
<string name="close">收起</string>
|
||||
<string name="time_cannot_be_greater_than_the_current_time">时间不能大于当前时间</string>
|
||||
<string name="msg_del_sure">是否確認刪除?</string>
|
||||
</resources>
|
||||
|
||||
@@ -1513,6 +1513,7 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="see_more">查看更多</string>
|
||||
<string name="close">收起</string>
|
||||
<string name="time_cannot_be_greater_than_the_current_time">时间不能大于当前时间</string>
|
||||
<string name="msg_del_sure">是否確認刪除?</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user