fix [修复-个人主页-点击视频-无法跳转问题]
This commit is contained in:
@@ -71,6 +71,8 @@ import com.yunbao.common.views.UserHomeImgsViewHolder;
|
||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||
import com.yunbao.live.dialog.GiftWallDialog;
|
||||
import com.yunbao.live.views.ShowBigPhoto;
|
||||
import com.yunbao.video.activity.VideoPlayActivity;
|
||||
import com.yunbao.video.utils.VideoStorge;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
@@ -152,7 +154,7 @@ public class UserHomeActivity extends AbsActivity {
|
||||
private LinearLayout bottomEditLayout;
|
||||
private UploadQnImpl mUploadStrategy;
|
||||
private List<ActiveBean> videoList = new ArrayList<>();
|
||||
List<ActiveOtherBean> beanList = new ArrayList<>();
|
||||
List<ActiveBean> beanList = new ArrayList<>();
|
||||
private UserHomeImgsViewHolder userHomeImgsViewHolder;
|
||||
private Map<String, String> gotoRoomKey = new HashMap<>();
|
||||
|
||||
@@ -183,26 +185,21 @@ public class UserHomeActivity extends AbsActivity {
|
||||
CommonHttpUtil.getOtherDynamicList(uid, new com.yunbao.common.http.HttpCallback() {
|
||||
@Override
|
||||
public void onSuccess(int code, String msg, String[] info) {
|
||||
beanList = JSONArray.parseArray(Arrays.toString(info), ActiveOtherBean.class);
|
||||
beanList = JSONArray.parseArray(Arrays.toString(info), ActiveBean.class);
|
||||
for (int j = 0; j < beanList.size(); j++) {
|
||||
if (beanList.get(j).getImg_or_video().equals("2")) {
|
||||
videoList.add(beanList.get(j));
|
||||
}
|
||||
}
|
||||
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;
|
||||
for (int i = 0; i < videoList.size(); i++) {
|
||||
if (videoList.get(i).getId().equals(bean.getId())) {
|
||||
playPosition = i;
|
||||
}
|
||||
}
|
||||
RouteUtil.forwardVideoActivity();*/
|
||||
}
|
||||
public void onImgItem(ActiveBean bean, int position) {
|
||||
RouteUtil.forwardCommunity(bean.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemMore(ActiveOtherBean bean, int position) {
|
||||
public void onItemMore(ActiveBean 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) {
|
||||
@@ -218,6 +215,18 @@ public class UserHomeActivity extends AbsActivity {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onItemVideo(ActiveBean activeBean, int position) {
|
||||
int playPosition = 0;
|
||||
for (int i = 0; i < videoList.size(); i++) {
|
||||
if (videoList.get(i).getId().equals(activeBean.getId())) {
|
||||
playPosition = i;
|
||||
}
|
||||
}
|
||||
VideoStorge.getInstance().put(Constants.VIDEO_HOME, videoList);
|
||||
VideoPlayActivity.forward(mContext, playPosition, Constants.VIDEO_HOME, 1);
|
||||
}
|
||||
});
|
||||
communityRecyclerView.setAdapter(userCommunityAdapter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user