|
|
@@ -1,7 +1,6 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.screen.contents;
|
|
|
|
|
|
import android.support.constraint.ConstraintLayout;
|
|
|
-import android.util.Log;
|
|
|
import android.view.View;
|
|
|
import android.widget.ImageView;
|
|
|
import android.widget.LinearLayout;
|
|
|
@@ -12,10 +11,12 @@ import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDescriptionBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailImageBean;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.api.ContentsMoreInfoBean;
|
|
|
import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.IEventListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.custom.contents.CustomListicleImageView;
|
|
|
import kr.co.zumo.app.lifeplus.view.custom.contents.CustomListicleInformationView;
|
|
|
+import kr.co.zumo.app.lifeplus.view.custom.contents.CustomMoreInfoView;
|
|
|
|
|
|
/**
|
|
|
* ContentsDetailListicleDetailViewHolder
|
|
|
@@ -29,10 +30,17 @@ import kr.co.zumo.app.lifeplus.view.custom.contents.CustomListicleInformationVie
|
|
|
*/
|
|
|
public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<ContentsDetailBean> {
|
|
|
|
|
|
+ private static final String TIME_INFO = "07";
|
|
|
+ private static final String MENU_DETAIL_INFO = "08";
|
|
|
+ private static final String PHONE_INFO = "09";
|
|
|
+ private static final String ADDRESS_INFO = "10";
|
|
|
+ private static final String PARKING_INFO = "11";
|
|
|
+
|
|
|
private CustomListicleImageView customListicleImageView;
|
|
|
private ConstraintLayout layoutMoreInfo;
|
|
|
private ConstraintLayout layoutMoreInfoPopUp;
|
|
|
private LinearLayout layoutContainer;
|
|
|
+ private LinearLayout layoutMoreInfoContainer;
|
|
|
private ImageView imageViewInfoDown;
|
|
|
|
|
|
public ContentsDetailListicleDetailViewHolder(View itemView) {
|
|
|
@@ -49,6 +57,7 @@ public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<C
|
|
|
imageViewInfoDown = itemView.findViewById(R.id.image_view_info_down);
|
|
|
layoutMoreInfo = itemView.findViewById(R.id.layout_more_info);
|
|
|
layoutMoreInfoPopUp = itemView.findViewById(R.id.layout_more_info_pop_up);
|
|
|
+ layoutMoreInfoContainer = itemView.findViewById(R.id.layout_more_info_container);
|
|
|
|
|
|
List<ContentsDetailImageBean> contentsDetailImageBeans = bean.getItemImageList();
|
|
|
customListicleImageView.init(itemView.getContext(), index, bean.getTitle(), bean.getSubTitle(), contentsDetailImageBeans, new IEventListener() {
|
|
|
@@ -64,8 +73,32 @@ public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<C
|
|
|
}
|
|
|
|
|
|
for (int i = 0; i < bean.getMoreInfoList().size(); i++) {
|
|
|
- Log.e("APP# ContentsDetailListicleDetailViewHolder | attach", "|" + bean.getMoreInfoList().get(i).getDetailType());
|
|
|
- Log.e("APP# ContentsDetailListicleDetailViewHolder | attach", "|" + bean.getMoreInfoList().get(i).getMoreInfo());
|
|
|
+ CustomMoreInfoView customMoreInfoView = null;
|
|
|
+
|
|
|
+ ContentsMoreInfoBean contentsMoreInfoBean = bean.getMoreInfoList().get(i);
|
|
|
+ switch (contentsMoreInfoBean.getDetailType()) {
|
|
|
+ case TIME_INFO:
|
|
|
+ customMoreInfoView = new CustomMoreInfoView(itemView.getContext(), R.drawable.icon_info_time, contentsMoreInfoBean.getMoreInfo());
|
|
|
+ break;
|
|
|
+ case PARKING_INFO:
|
|
|
+ customMoreInfoView = new CustomMoreInfoView(itemView.getContext(), R.drawable.icon_info_parking, contentsMoreInfoBean.getMoreInfo());
|
|
|
+ break;
|
|
|
+ case MENU_DETAIL_INFO:
|
|
|
+ customMoreInfoView = new CustomMoreInfoView(itemView.getContext(), R.drawable.icon_info_menu, contentsMoreInfoBean.getMoreInfo());
|
|
|
+ break;
|
|
|
+ case PHONE_INFO:
|
|
|
+ break;
|
|
|
+ case ADDRESS_INFO:
|
|
|
+ customMoreInfoView = new CustomMoreInfoView(itemView.getContext(), R.drawable.icon_info_info, contentsMoreInfoBean.getMoreInfo());
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (null != customMoreInfoView) {
|
|
|
+ layoutMoreInfoContainer.addView(customMoreInfoView);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
layoutMoreInfo.setOnClickListener(view -> {
|
|
|
@@ -85,7 +118,9 @@ public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<C
|
|
|
customListicleImageView.dispose();
|
|
|
customListicleImageView = null;
|
|
|
layoutContainer.removeAllViews();
|
|
|
+ layoutMoreInfoContainer.removeAllViews();
|
|
|
layoutContainer = null;
|
|
|
+ layoutMoreInfoContainer = null;
|
|
|
}
|
|
|
}
|
|
|
|