Commit dfa60527 authored by jianglx's avatar jianglx

修复视频闪退的bug

parent 864652a7
......@@ -34,6 +34,7 @@ import com.xxrv.video.activity.TriListActivity;
import com.xxrv.video.adapter.CommentVideoAdapter;
import com.xxrv.video.api.VideoApi;
import com.xxrv.video.base.Proxy;
import com.xxrv.video.bean.circle.Comment;
import com.xxrv.video.bean.circle.DiscoveryDataBean;
import com.xxrv.video.bean.circle.VideoIMTokenBean;
import com.xxrv.video.dialog.TrillCommDialog;
......@@ -43,6 +44,7 @@ import com.yuyife.okgo.OkGoUtil;
import java.lang.reflect.ParameterizedType;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
......@@ -347,29 +349,29 @@ public class JcvTrillVideo extends FrameLayout implements BaseView, View.OnClick
tvAddress.setText(bean.getLocation());
}
commentVideoAdapter.addData(bean.getComments());
// commentVideoAdapter.addData(bean.getComments());
// List<Comment> comments = bean.getComments();
// if (comments != null && comments.size() > 0) {
// tvConmmentHint1.setVisibility(VISIBLE);
// tvConmmentHint1.setText(comments.get(0).getBody());
// } else {
// tvConmmentHint1.setVisibility(GONE);
// }
//
// if (comments != null && comments.size() > 1) {
// tvConmmentHint2.setVisibility(VISIBLE);
// tvConmmentHint2.setText(comments.get(1).getBody());
// } else {
// tvConmmentHint2.setVisibility(GONE);
// }
//
// if (comments != null && comments.size() > 2) {
// tvConmmentHint3.setVisibility(VISIBLE);
// tvConmmentHint3.setText(comments.get(2).getBody());
// } else {
// tvConmmentHint3.setVisibility(GONE);
// }
List<Comment> comments = bean.getComments();
if (comments != null && comments.size() > 0) {
tvConmmentHint1.setVisibility(VISIBLE);
tvConmmentHint1.setText(comments.get(0).getBody());
} else {
tvConmmentHint1.setVisibility(GONE);
}
if (comments != null && comments.size() > 1) {
tvConmmentHint2.setVisibility(VISIBLE);
tvConmmentHint2.setText(comments.get(1).getBody());
} else {
tvConmmentHint2.setVisibility(GONE);
}
if (comments != null && comments.size() > 2) {
tvConmmentHint3.setVisibility(VISIBLE);
tvConmmentHint3.setText(comments.get(2).getBody());
} else {
tvConmmentHint3.setVisibility(GONE);
}
}
@Override
......
......@@ -203,6 +203,7 @@
<android.support.v7.widget.RecyclerView
android:id="@+id/rv_content"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="@dimen/size_60" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment