Просмотр исходного кода

[메인][Common] more info 구현 중

Hasemi 7 лет назад
Родитель
Сommit
9a4c901fd6

+ 15 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/contents/ContentsDetailListicleDetailViewHolder.java

@@ -3,6 +3,7 @@ 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;
 
 import java.util.List;
@@ -30,7 +31,9 @@ public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<C
 
   private CustomListicleImageView customListicleImageView;
   private ConstraintLayout layoutMoreInfo;
+  private ConstraintLayout layoutMoreInfoPopUp;
   private LinearLayout layoutContainer;
+  private ImageView imageViewInfoDown;
 
   public ContentsDetailListicleDetailViewHolder(View itemView) {
     super(itemView);
@@ -42,7 +45,10 @@ public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<C
 
     customListicleImageView = itemView.findViewById(R.id.custom_listicle_image_view);
     layoutContainer = itemView.findViewById(R.id.layout_container);
+
+    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);
 
     List<ContentsDetailImageBean> contentsDetailImageBeans = bean.getItemImageList();
     customListicleImageView.init(itemView.getContext(), index, bean.getTitle(), bean.getSubTitle(), contentsDetailImageBeans, new IEventListener() {
@@ -57,12 +63,19 @@ public class ContentsDetailListicleDetailViewHolder extends ContentsDetailView<C
       layoutContainer.addView(informationView);
     }
 
-    for(int i = 0; i<bean.getMoreInfoList().size(); i++){
+    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());
     }
 
-    layoutMoreInfo.setOnClickListener(view -> {});
+    layoutMoreInfo.setOnClickListener(view -> {
+      layoutMoreInfoPopUp.setVisibility(View.VISIBLE);
+
+    });
+
+    imageViewInfoDown.setOnClickListener(view -> {
+      layoutMoreInfoPopUp.setVisibility(View.GONE);
+    });
 
   }
 

+ 7 - 0
app/src/main/res/drawable/icon_info_down.xml

@@ -0,0 +1,7 @@
+<vector android:height="14dp" android:viewportHeight="56"
+    android:viewportWidth="56" android:width="14dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="0.7" android:fillColor="#00000000"
+        android:fillType="evenOdd"
+        android:pathData="M48,17.333l-20,20 -20,-20"
+        android:strokeAlpha="0.7" android:strokeColor="#666" android:strokeWidth="4"/>
+</vector>

+ 8 - 3
app/src/main/res/layout/contents_listicle_detail.xml

@@ -51,11 +51,11 @@
     android:paddingTop="5dp"
     android:paddingEnd="13dp"
     android:paddingBottom="5dp"
-    android:visibility="gone"
-    tools:visibility="visible"
+    android:visibility="visible"
     app:layout_constraintBottom_toBottomOf="parent"
     app:layout_constraintEnd_toEndOf="parent"
-    app:layout_constraintStart_toStartOf="parent">
+    app:layout_constraintStart_toStartOf="parent"
+    tools:visibility="visible">
 
     <ImageView
 
@@ -85,4 +85,9 @@
       />
 
   </android.support.constraint.ConstraintLayout>
+
+  <include
+    layout="@layout/contents_more_info"
+    android:visibility="gone"
+    />
 </android.support.constraint.ConstraintLayout>

+ 84 - 60
app/src/main/res/layout/contents_more_info.xml

@@ -3,8 +3,24 @@
   xmlns:android="http://schemas.android.com/apk/res/android"
   xmlns:app="http://schemas.android.com/apk/res-auto"
   xmlns:tools="http://schemas.android.com/tools"
+  android:id="@+id/layout_more_info_pop_up"
   android:layout_width="match_parent"
-  android:layout_height="match_parent">
+  android:layout_height="match_parent"
+  android:layout_marginTop="203dp"
+  android:background="@color/CFFFFFF">
+
+  <ImageView
+    android:id="@+id/image_view_info_down"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="5dp"
+    android:padding="10dp"
+    app:layout_constraintBottom_toTopOf="@+id/first_layout"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent"
+    app:srcCompat="@drawable/icon_info_down"
+    />
 
   <android.support.constraint.ConstraintLayout
     android:id="@+id/first_layout"
@@ -26,71 +42,84 @@
       />
   </android.support.constraint.ConstraintLayout>
 
-  <android.support.constraint.ConstraintLayout
-    android:id="@+id/layout_time_info"
+  <ScrollView
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginTop="19dp"
     app:layout_constraintTop_toBottomOf="@+id/first_layout">
 
-    <ImageView
-      android:id="@+id/image_view_time"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginStart="26dp"
-      app:layout_constraintStart_toStartOf="parent"
-      app:srcCompat="@drawable/icon_info_time"
-      />
-
-    <TextView
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginStart="14dp"
-      android:lineSpacingExtra="9.5sp"
-      android:textColor="@color/C000000"
-      android:textSize="12sp"
-      app:layout_constraintBottom_toBottomOf="parent"
-      app:layout_constraintStart_toEndOf="@+id/image_view_time"
-      app:layout_constraintTop_toTopOf="parent"
-      tools:text="월 ~ 목요일 : 오후 12시 ~ 오후 9시
+    <android.support.constraint.ConstraintLayout
+
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content">
+
+      <android.support.constraint.ConstraintLayout
+        android:id="@+id/layout_time_info"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="19dp"
+        >
+
+        <ImageView
+          android:id="@+id/image_view_time"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="26dp"
+          app:layout_constraintStart_toStartOf="parent"
+          app:srcCompat="@drawable/icon_info_time"
+          />
+
+        <TextView
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="14dp"
+          android:lineSpacingExtra="9.5sp"
+          android:textColor="@color/C000000"
+          android:textSize="12sp"
+          app:layout_constraintBottom_toBottomOf="parent"
+          app:layout_constraintStart_toEndOf="@+id/image_view_time"
+          app:layout_constraintTop_toTopOf="parent"
+          tools:text="월 ~ 목요일 : 오후 12시 ~ 오후 9시
 토요일 : 오전 10시 ~ 오후 11시
 일요일 : 오전 11시 ~ 오후 11시
 화요일 : 휴무"
-      />
-  </android.support.constraint.ConstraintLayout>
-
-  <android.support.constraint.ConstraintLayout
-    android:id="@+id/layout_menu"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:layout_marginTop="19dp"
-    app:layout_constraintTop_toBottomOf="@+id/layout_time_info">
-
-    <ImageView
-      android:id="@+id/image_view_menu"
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginStart="26dp"
-      app:layout_constraintStart_toStartOf="parent"
-      app:srcCompat="@drawable/icon_info_menu"
-      />
-
-    <TextView
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      android:layout_marginStart="14dp"
-      android:lineSpacingExtra="9.5sp"
-      android:textColor="@color/C000000"
-      android:textSize="12sp"
-      app:layout_constraintBottom_toBottomOf="parent"
-      app:layout_constraintStart_toEndOf="@+id/image_view_menu"
-      app:layout_constraintTop_toTopOf="parent"
-      tools:text="월 ~ 목요일 : 오후 12시 ~ 오후 9시
+          />
+      </android.support.constraint.ConstraintLayout>
+
+      <android.support.constraint.ConstraintLayout
+        android:id="@+id/layout_menu"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="19dp"
+        app:layout_constraintTop_toBottomOf="@+id/layout_time_info">
+
+        <ImageView
+          android:id="@+id/image_view_menu"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="26dp"
+          app:layout_constraintStart_toStartOf="parent"
+          app:srcCompat="@drawable/icon_info_menu"
+          />
+
+        <TextView
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="14dp"
+          android:lineSpacingExtra="9.5sp"
+          android:textColor="@color/C000000"
+          android:textSize="12sp"
+          app:layout_constraintBottom_toBottomOf="parent"
+          app:layout_constraintStart_toEndOf="@+id/image_view_menu"
+          app:layout_constraintTop_toTopOf="parent"
+          tools:text="월 ~ 목요일 : 오후 12시 ~ 오후 9시
 토요일 : 오전 10시 ~ 오후 11시
 일요일 : 오전 11시 ~ 오후 11시
 화요일 : 휴무"
-      />
-  </android.support.constraint.ConstraintLayout>
+          />
+      </android.support.constraint.ConstraintLayout>
+    </android.support.constraint.ConstraintLayout>
+  </ScrollView>
 
   <android.support.constraint.ConstraintLayout
     android:layout_width="match_parent"
@@ -216,11 +245,6 @@
       app:srcCompat="@drawable/icon_info_address_wh"
       />
 
-    <ImageView
-      android:layout_width="wrap_content"
-      android:layout_height="wrap_content"
-      app:srcCompat="@drawable/icon_info_call_wh"
-      />
   </android.support.constraint.ConstraintLayout>
 
 </android.support.constraint.ConstraintLayout>