|
|
@@ -9,8 +9,8 @@ import java.util.List;
|
|
|
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDescriptionBean;
|
|
|
-import kr.co.zumo.app.lifeplus.bean.api.ContentsItemBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailImageBean;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.api.ContentsItemBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsMoreInfoBean;
|
|
|
import kr.co.zumo.app.lifeplus.util.StringUtil;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
@@ -81,16 +81,29 @@ public class ContentsListicleHolder extends ContentsHolder<ContentsItemBean> {
|
|
|
layoutContainer.addView(informationView);
|
|
|
}
|
|
|
|
|
|
- layoutMoreInfoPopup.setVisibility(bean.getMoreInfoList().size() == 0 ? View.GONE : View.VISIBLE);
|
|
|
- for (int i = 0; i < bean.getMoreInfoList().size(); ++i) {
|
|
|
- ContentsMoreInfoBean contentsMoreInfoBean = bean.getMoreInfoList().get(i);
|
|
|
- layoutMoreInfoPopup.setVisibility(null != contentsMoreInfoBean.getMoreInfo() && StringUtil.isFull(contentsMoreInfoBean.getMoreInfo()) ? View.VISIBLE : View.GONE);
|
|
|
- }
|
|
|
+ if (null != bean.getMoreInfoList()) {
|
|
|
+ if (bean.getMoreInfoList().size() == 0) {
|
|
|
+ layoutMoreInfoPopup.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ boolean visible = false;
|
|
|
+ for (int i = 0; i < bean.getMoreInfoList().size(); ++i) {
|
|
|
+ ContentsMoreInfoBean contentsMoreInfoBean = bean.getMoreInfoList().get(i);
|
|
|
+ if (null != contentsMoreInfoBean && StringUtil.isFull(contentsMoreInfoBean.getMoreInfo())) {
|
|
|
+ visible = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- layoutMoreInfoPopup.setOnClickListener(view -> {
|
|
|
- listener.onEvent(new Event.Builder(Event.MORE).index(getAdapterPosition()).build());
|
|
|
- });
|
|
|
+ layoutMoreInfoPopup.setVisibility(visible ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
+ if (visible) {
|
|
|
+ layoutMoreInfoPopup.setOnClickListener(view -> {
|
|
|
+ listener.onEvent(new Event.Builder(Event.MORE).index(getAdapterPosition()).build());
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|