add [新增-个人主页-动态删除]
This commit is contained in:
@@ -141,6 +141,7 @@ public class UserHomeActivity extends AbsActivity {
|
||||
private LinearLayout bottomEditLayout;
|
||||
private UploadQnImpl mUploadStrategy;
|
||||
private List<ActiveBean> videoList = new ArrayList<>();
|
||||
List<ActiveOtherBean> beanList = new ArrayList<>();
|
||||
|
||||
private UserHomeImgsViewHolder userHomeImgsViewHolder;
|
||||
|
||||
@@ -171,27 +172,40 @@ public class UserHomeActivity extends AbsActivity {
|
||||
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);
|
||||
beanList = JSONArray.parseArray(Arrays.toString(info), ActiveOtherBean.class);
|
||||
UserCommunityAdapter userCommunityAdapter = new UserCommunityAdapter(mContext, beanList,isMe);
|
||||
userCommunityAdapter.setOnItemClickListener(new UserCommunityAdapter.onItemClickListener() {
|
||||
@Override
|
||||
public void onImgItem(ActiveOtherBean bean, int position) {
|
||||
if (bean.getImg_or_video().equals("1")) {
|
||||
RouteUtil.forwardCommunity(bean.getId());
|
||||
} else {
|
||||
int playPosition = 0;
|
||||
/*int playPosition = 0;
|
||||
for (int i = 0; i < videoList.size(); i++) {
|
||||
if (videoList.get(i).getId().equals(bean.getId())) {
|
||||
playPosition = i;
|
||||
}
|
||||
}
|
||||
RouteUtil.forwardVideoActivity();
|
||||
RouteUtil.forwardVideoActivity();*/
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onVideoItem(String activeBean, int position) {
|
||||
|
||||
public void onItemMore(ActiveOtherBean bean, int position) {
|
||||
DialogUitl.showSimpleDialog(mContext, getResources().getString(com.yunbao.main.R.string.msg_del_sure), false, new DialogUitl.SimpleCallback() {
|
||||
@Override
|
||||
public void onConfirmClick(Dialog dialog, String content) {
|
||||
CommonHttpUtil.delActive(bean.getId(), new com.yunbao.common.http.HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
if (code == 0) {
|
||||
beanList.remove(position);
|
||||
userCommunityAdapter.notifyItemRemoved(position);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
communityRecyclerView.setAdapter(userCommunityAdapter);
|
||||
|
||||
Reference in New Issue
Block a user