Browse Source

Merge branch 'develop' of https://github.com/swict/LifeplusAndroid into develop

hyodong.min 7 years ago
parent
commit
21a7a035ae

+ 13 - 2
app/src/main/java/kr/co/zumo/app/lifeplus/view/custom/event/EventCombinedTypeSelectView.java

@@ -37,12 +37,14 @@ public class EventCombinedTypeSelectView extends ConstraintLayout implements Che
     super(context, attrs, defStyleAttr);
   }
 
-  public void init(Context context) {
+  public void init(Context context, String checkBoxText) {
     if (null != context) {
       LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
       inflater.inflate(R.layout.event_combined_type_select_view, this);
 
       checkBox = findViewById(R.id.check_box);
+      checkBox.setText(checkBoxText);
+
       checkBox.setOnClickListener(view -> {
         if (null != listener) {
           listener.onClick(this);
@@ -58,11 +60,20 @@ public class EventCombinedTypeSelectView extends ConstraintLayout implements Che
 
   @Override
   public boolean isChecked() {
-    return false;
+    return checkBox.isChecked();
   }
 
   @Override
   public void toggle() {
 
   }
+
+  public void setText(String text) {
+    checkBox.setText(text);
+  }
+
+  @Override
+  public void setOnClickListener(@Nullable OnClickListener listener) {
+    this.listener = listener;
+  }
 }

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventDetailAdapter.java

@@ -122,7 +122,7 @@ public class EventDetailAdapter extends RecyclerView.Adapter<EventDetailView> {
         case 3:
           return TYPE_EVENT_SELECT_RESULT;
         case 4:
-          return TYPE_EVENT_RECOMMEND_DEFAULT;
+          return TYPE_EVENT_RECOMMEND_TAG;
         default:
           return TYPE_EVENT_SELECT_TEXT;
       }

+ 0 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventSelectCombinedHolder.java

@@ -32,7 +32,6 @@ public class EventSelectCombinedHolder extends EventDetailView {
 
   public EventSelectCombinedHolder(View itemView) {
     super(itemView);
-
     textViewQuestionTitle = itemView.findViewById(R.id.text_view_question_title);
     textViewQuestionSubTitle = itemView.findViewById(R.id.text_view_question_sub_title);
     eventEnterTypeSelectView = itemView.findViewById(R.id.event_select_area);

+ 27 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventSelectRecommendTagAdapter.java

@@ -0,0 +1,27 @@
+package kr.co.zumo.app.lifeplus.view.screen.event;
+
+import android.content.Context;
+
+import java.util.List;
+
+import kr.co.zumo.app.lifeplus.bean.api.LifeplusContentsBean;
+import kr.co.zumo.app.lifeplus.view.IEventListener;
+import kr.co.zumo.app.lifeplus.view.screen.my.bucketlist.BucketListDetailAdapter;
+
+/**
+ * EventSelectRecommendTagAdapter
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2019-01-10]   [최초 작성]
+ * @since 2019-01-10
+ */
+public class EventSelectRecommendTagAdapter extends BucketListDetailAdapter {
+
+
+  public EventSelectRecommendTagAdapter(Context context, List<LifeplusContentsBean> beans, IEventListener listener) {
+    super(context, beans, listener);
+  }
+}

+ 57 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventSelectRecommendTagHolder.java

@@ -1,6 +1,21 @@
 package kr.co.zumo.app.lifeplus.view.screen.event;
 
+import android.net.Uri;
+import android.support.constraint.ConstraintLayout;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.view.View;
+import android.widget.ImageView;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.bean.api.LifeplusContentsBean;
+import kr.co.zumo.app.lifeplus.view.Event;
+import kr.co.zumo.app.lifeplus.view.IEventListener;
 
 /**
  * EventSelectRecommendTagHolder
@@ -14,5 +29,46 @@ import android.view.View;
  */
 public class EventSelectRecommendTagHolder extends EventDetailView {
 
-  public EventSelectRecommendTagHolder(View itemView) {super(itemView);}
+  private ImageView imageViewBackGround;
+  private TextView textViewEventTitle;
+  private TextView textViewSelectTitle;
+  private LinearLayout linearLayoutContents;
+  private RecyclerView recyclerViewEventList;
+  private ConstraintLayout layoutNothing;
+  private List<LifeplusContentsBean> beans;
+
+  public EventSelectRecommendTagHolder(View itemView) {
+    super(itemView);
+    imageViewBackGround = itemView.findViewById(R.id.image_background);
+    textViewEventTitle = itemView.findViewById(R.id.text_view_event_title);
+    textViewSelectTitle = itemView.findViewById(R.id.text_view_select_title);
+    linearLayoutContents = itemView.findViewById(R.id.layout_contents);
+    recyclerViewEventList = itemView.findViewById(R.id.recycler_view_event_list_detail);
+    layoutNothing = itemView.findViewById(R.id.layout_nothing);
+  }
+
+  @Override
+  public void init(IEventListener listener) {
+    imageViewBackGround.setImageDrawable(itemView.getResources().getDrawable(R.drawable.img_bestbucket_banner_1));
+    textViewEventTitle.setText("한화님이 좋아하는 데이트 유형은?");
+    textViewSelectTitle.setText("#신나는 #실내 #따뜻한분위기\n#매콤달콤한 소스의 닭요리");
+    setDummyData();
+    recyclerViewEventList.setAdapter(new EventSelectRecommendTagAdapter(itemView.getContext(), beans, new IEventListener() {
+      @Override
+      public void onEvent(Event event) {
+        listener.onEvent(event);
+      }
+    }));
+    recyclerViewEventList.setLayoutManager(new LinearLayoutManager(itemView.getContext(), LinearLayoutManager.VERTICAL, false));
+  }
+
+  private void setDummyData() {
+    beans = new ArrayList<>();
+    LifeplusContentsBean bean = new LifeplusContentsBean();
+    Uri uri = Uri.parse("android.resource://" + itemView.getContext().getPackageName() + "/drawable/banner_bg_1");
+    bean.setImageUrl(uri.toString());
+    bean.setSubTitle("subTitle");
+    bean.setTitle("title");
+    beans.add(bean);
+  }
 }

+ 9 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/event/EventSelectTextHolder.java

@@ -2,12 +2,14 @@ package kr.co.zumo.app.lifeplus.view.screen.event;
 
 import android.view.View;
 import android.widget.ImageView;
+import android.widget.LinearLayout;
 import android.widget.TextView;
 
 import kr.co.zumo.app.R;
 import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.IEventListener;
+import kr.co.zumo.app.lifeplus.view.custom.event.EventCombinedTypeSelectView;
 
 /**
  * EventSelectTextHolder
@@ -25,7 +27,7 @@ public class EventSelectTextHolder extends EventDetailView {
   private TextView textViewSubQuestion;
   private ImageView imageViewIconConfirm;
   private TextView textViewConfirm;
-
+  private LinearLayout layoutSelectArea;
 
   public EventSelectTextHolder(View itemView) {
     super(itemView);
@@ -33,6 +35,7 @@ public class EventSelectTextHolder extends EventDetailView {
     textViewSubQuestion = itemView.findViewById(R.id.text_view_sub_question);
     imageViewIconConfirm = itemView.findViewById(R.id.icon_info);
     textViewConfirm = itemView.findViewById(R.id.text_view_confirm);
+    layoutSelectArea = itemView.findViewById(R.id.layout_select_area);
     itemView.setPadding(0, ResourceUtil.getStatusBarHeightManual(), 0, 0);
   }
 
@@ -45,5 +48,10 @@ public class EventSelectTextHolder extends EventDetailView {
     imageViewIconConfirm.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.DETAIL).build());});
     textViewConfirm.setOnClickListener(view -> {listener.onEvent(new Event.Builder(Event.DETAIL).build());});
 
+    for (int i = 0; i < 2; i++) {
+      EventCombinedTypeSelectView selectView = new EventCombinedTypeSelectView(itemView.getContext());
+      selectView.init(itemView.getContext(), "#조용한");
+      layoutSelectArea.addView(selectView);
+    }
   }
 }

+ 12 - 4
app/src/main/res/layout/event_combined_type_select_view.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
-<merge
+<android.support.constraint.ConstraintLayout
   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:layout_width="wrap_content"
   android:layout_height="wrap_content"
@@ -10,10 +11,12 @@
     android:id="@+id/check_box"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:layout_marginEnd="9dp"
+    android:layout_marginStart="3dp"
+    android:layout_marginTop="4dp"
+    android:layout_marginEnd="3dp"
+    android:layout_marginBottom="4dp"
     android:background="@drawable/event_select_custom_radio_selector"
     android:button="@null"
-    tools:checked="true"
     android:lineSpacingExtra="4sp"
     android:paddingStart="22dp"
     android:paddingTop="12dp"
@@ -22,6 +25,11 @@
     android:textAlignment="center"
     android:textColor="@drawable/event_select_custom_text_selector"
     android:textSize="12sp"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintEnd_toEndOf="parent"
+    app:layout_constraintStart_toStartOf="parent"
+    app:layout_constraintTop_toTopOf="parent"
+    tools:checked="true"
     tools:text="#따뜻한 분위기"
     />
-</merge>
+</android.support.constraint.ConstraintLayout>

+ 198 - 3
app/src/main/res/layout/event_select_type_recommend_tag.xml

@@ -1,6 +1,201 @@
 <?xml version="1.0" encoding="utf-8"?>
-<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-                                             android:layout_width="match_parent"
-                                             android:layout_height="match_parent">
+<android.support.constraint.ConstraintLayout
+  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:layout_width="match_parent"
+  android:layout_height="match_parent">
 
+  <android.support.design.widget.CoordinatorLayout
+    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/scroll_layout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:orientation="vertical"
+    app:layout_constrainedHeight="true"
+    app:layout_constraintBottom_toTopOf="@id/layout_nothing"
+    app:layout_constraintTop_toTopOf="parent"
+    app:layout_constraintVertical_bias="0">
+
+    <!--header영역-->
+    <android.support.design.widget.AppBarLayout
+      android:id="@+id/app_bar_layout"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:background="@null"
+      app:elevation="0dp">
+
+      <android.support.design.widget.CollapsingToolbarLayout
+        android:id="@+id/collapsing_tool_bar"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:layout_scrollFlags="scroll|exitUntilCollapsed">
+
+        <android.support.v7.widget.Toolbar
+          android:id="@+id/flexible.example.toolbar"
+          android:layout_width="match_parent"
+          android:layout_height="137dp"
+          android:background="@null"
+          android:elevation="0dp"
+          android:visibility="invisible"
+          app:elevation="0dp"
+          app:layout_collapseMode="pin"
+          app:layout_scrollFlags="scroll|enterAlways"
+          tools:visibility="gone"
+          />
+
+        <ImageView
+          android:id="@+id/image_background"
+          android:layout_width="match_parent"
+          android:layout_height="208dp"
+          android:scaleType="centerCrop"
+          app:layout_collapseMode="parallax"
+          tools:src="@drawable/img_bestbucket_banner_1"/>
+
+        <ImageView
+          android:layout_width="match_parent"
+          android:layout_height="208dp"
+          android:scaleType="centerCrop"
+          android:src="@drawable/rectangle_dim_black_50_gradation"
+          app:layout_collapseMode="parallax"/>
+
+        <android.support.constraint.ConstraintLayout
+          android:id="@+id/layout_select_bucket"
+          android:layout_width="wrap_content"
+          android:layout_height="208dp"
+          android:layout_gravity="center"
+          app:layout_collapseMode="parallax">
+
+
+          <TextView
+            android:id="@+id/text_view_event_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:lineSpacingExtra="8sp"
+            android:textColor="@color/CFFFFFF"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            android:textSize="21sp"
+            app:layout_constraintTop_toTopOf="parent"
+            android:layout_marginTop="91dp"
+            tools:text="한화님이 좋아하는 데이트 유형은?"/>
+
+          <TextView
+            android:id="@+id/text_view_select_title"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:lineSpacingExtra="5.5sp"
+            android:textColor="@color/CC3C3C3"
+            android:textSize="14sp"
+            app:layout_constraintStart_toStartOf="parent"
+            app:layout_constraintEnd_toEndOf="parent"
+            android:layout_marginTop="8dp"
+            app:layout_constraintTop_toBottomOf="@+id/text_view_event_title"
+            tools:text="#신나는 #실내 #따뜻한분위기
+#매콤달콤한 소스의 닭요리"/>
+        </android.support.constraint.ConstraintLayout>
+
+      </android.support.design.widget.CollapsingToolbarLayout>
+
+      <LinearLayout
+        android:id="@+id/layout_tags"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_gravity="bottom"
+        android:background="@color/CFFFFFF"
+        android:orientation="vertical"
+        app:layout_scrollFlags="exitUntilCollapsed">
+
+        <LinearLayout
+          android:layout_width="match_parent"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="25dp"
+          android:layout_marginTop="18dp"
+          android:layout_marginBottom="13dp"
+          android:orientation="vertical">
+
+          <TextView
+            android:id="@+id/text_title"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:lineSpacingExtra="4sp"
+            android:text="@string/contents_recommend_comment"
+            android:textColor="@color/C999999"
+            android:textSize="12sp"
+            />
+        </LinearLayout>
+
+        <HorizontalScrollView
+          android:layout_width="match_parent"
+          android:layout_height="wrap_content"
+          android:clipToPadding="false"
+          android:paddingEnd="25dp"
+          android:scrollbars="none">
+
+          <LinearLayout
+            android:id="@+id/layout_contents"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="25dp"
+            android:orientation="horizontal"
+            >
+
+          </LinearLayout>
+        </HorizontalScrollView>
+      </LinearLayout>
+    </android.support.design.widget.AppBarLayout>
+
+
+    <android.support.v7.widget.RecyclerView
+      android:id="@+id/recycler_view_event_list_detail"
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="10dp"
+      android:clipToPadding="false"
+      android:paddingTop="15dp"
+      app:layout_behavior="@string/appbar_scrolling_view_behavior"
+      />
+
+  </android.support.design.widget.CoordinatorLayout>
+
+  <android.support.constraint.ConstraintLayout
+    android:id="@+id/layout_nothing"
+    android:layout_width="match_parent"
+    android:layout_height="0dp"
+    android:visibility="gone"
+    app:layout_constraintBottom_toBottomOf="parent"
+    app:layout_constraintTop_toBottomOf="@id/scroll_layout"
+    tools:visibility="visible">
+
+    <ImageView
+      android:id="@+id/image_view_filter_result_nothing"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      app:layout_constraintBottom_toTopOf="@+id/textView9"
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toTopOf="parent"
+      app:layout_constraintVertical_chainStyle="packed"
+      app:srcCompat="@drawable/ic_icon_search_none"/>
+
+    <TextView
+      android:id="@+id/textView9"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="17dp"
+      android:gravity="center_horizontal"
+      android:lineSpacingExtra="6sp"
+      android:text="@string/bucket_list_search_none"
+      android:textColor="@color/CC5C5C5"
+      android:textSize="14sp"
+      app:layout_constraintBottom_toBottomOf="parent"
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintHorizontal_bias="0.5"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toBottomOf="@+id/image_view_filter_result_nothing"/>
+
+  </android.support.constraint.ConstraintLayout>
 </android.support.constraint.ConstraintLayout>

+ 20 - 3
app/src/main/res/layout/event_select_type_text.xml

@@ -42,11 +42,11 @@
     android:layout_marginEnd="25dp"
     android:layout_marginBottom="100dp"
     android:scaleType="centerCrop"
+    android:src="@drawable/img_bookmark_default"
     app:layout_constraintBottom_toBottomOf="parent"
     app:layout_constraintEnd_toEndOf="parent"
     app:layout_constraintStart_toStartOf="parent"
     app:layout_constraintTop_toTopOf="parent"
-    android:src="@drawable/img_bookmark_default"
     />
 
   <View
@@ -73,12 +73,12 @@
     android:shadowColor="#80000000"
     android:shadowDy="1"
     android:shadowRadius="3"
+    android:text="Q."
     android:textColor="@color/CFFFFFF"
     android:textSize="25sp"
     app:layout_constraintEnd_toEndOf="@+id/image_view_background"
     app:layout_constraintStart_toStartOf="@+id/image_view_background"
-    app:layout_constraintTop_toTopOf="@+id/image_view_background"
-    android:text="Q."/>
+    app:layout_constraintTop_toTopOf="@+id/image_view_background"/>
 
   <TextView
     android:id="@+id/text_view_question"
@@ -112,6 +112,23 @@
     app:layout_constraintTop_toBottomOf="@+id/text_view_question"
     tools:text="나를 잘 표현할 수 있는 태그를 선택해주세요."/>
 
+  <LinearLayout
+    android:id="@+id/layout_select_area"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="33dp"
+    android:layout_marginTop="106dp"
+    android:layout_marginEnd="33dp"
+    android:gravity="center"
+    android:orientation="horizontal"
+    app:layout_constraintEnd_toEndOf="@+id/image_view_background"
+    app:layout_constraintStart_toStartOf="@+id/image_view_background"
+    app:layout_constraintTop_toBottomOf="@+id/text_view_sub_question"
+    tools:background="@color/C999999"
+    tools:layout_height="30dp">
+
+  </LinearLayout>
+
   <ImageView
     android:id="@+id/icon_info"
     android:layout_width="wrap_content"

+ 1 - 0
app/src/main/res/values/colors.xml

@@ -37,6 +37,7 @@
   <color name="CC4C4C4">#c4c4c4</color>
   <color name="C888888">#888888</color>
   <color name="CF6F6F6">#f6f6f6</color>
+  <color name="CC3C3C3">#c3c3c3</color>
 </resources>
 
   <!--opacity 설정-->

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -798,6 +798,7 @@
   <string name="coin_minus">사용</string>
   <string name="coin_plus">적립</string>
   <string name="evet_participation">이벤트 참여하기</string>
+  <string name="contents_recommend_comment">이런 콘텐츠는 어떠세요?</string>
 
   <!-- 임의 추가 문자열 : 끝 -->
 </resources>