Browse Source

[마이][Common] 버킷리스트 연관태그 설정 상세화면 페이지 구현

Hasemi 7 years ago
parent
commit
961fc84666

+ 4 - 4
.idea/assetWizardSettings.xml

@@ -14,11 +14,11 @@
                         <option name="values">
                           <map>
                             <entry key="assetSourceType" value="FILE" />
-                            <entry key="height" value="18" />
-                            <entry key="outputName" value="ic_icon_header_back_white" />
+                            <entry key="height" value="13" />
+                            <entry key="outputName" value="icon_bucket_complete_white" />
                             <entry key="overrideSize" value="true" />
-                            <entry key="sourceFile" value="C:\Users\Hasemi\Downloads\icon_header_back_white.svg" />
-                            <entry key="width" value="18" />
+                            <entry key="sourceFile" value="C:\Users\Hasemi\Downloads\icon_bucket_complete_white.svg" />
+                            <entry key="width" value="13" />
                           </map>
                         </option>
                       </PersistentState>

+ 49 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/bucketlist/MyBucketListRelatedTagAdapter.java

@@ -0,0 +1,49 @@
+package kr.co.zumo.app.lifeplus.view.fragment.bucketlist;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+import kr.co.zumo.app.R;
+
+/**
+ * MyBuckeListRelatedTagAdapter
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2018-10-19]   [최초 작성]
+ * @since 2018-10-19
+ */
+public class MyBucketListRelatedTagAdapter extends RecyclerView.Adapter<MyBucketListRelatedTagViewHolder> {
+
+  private LayoutInflater layoutInflater;
+  private Context context;
+
+  public MyBucketListRelatedTagAdapter(Context context) {
+    this.context = context;
+    this.layoutInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+  }
+
+  @NonNull
+  @Override
+  public MyBucketListRelatedTagViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+    View view = layoutInflater.inflate(R.layout.bucket_related_tag_card_view, parent, false);
+    return new MyBucketListRelatedTagViewHolder(view);
+  }
+
+  @Override
+  public void onBindViewHolder(@NonNull MyBucketListRelatedTagViewHolder holder, int position) {
+    holder.dataSetting();
+
+  }
+
+  @Override
+  public int getItemCount() {
+    return 10;
+  }
+}

+ 20 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/bucketlist/MyBucketListRelatedTagFragment.java

@@ -1,14 +1,18 @@
 package kr.co.zumo.app.lifeplus.view.fragment.bucketlist;
 
+import android.graphics.Rect;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
 
 import kr.co.zumo.app.R;
 import kr.co.zumo.app.lifeplus.model.BlankModel;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.fragment.FragmentBase;
 import kr.co.zumo.app.lifeplus.view.presenter.MyBucketListRelatedTagPresenter;
 
@@ -23,6 +27,9 @@ import kr.co.zumo.app.lifeplus.view.presenter.MyBucketListRelatedTagPresenter;
  * @since 2018-10-19
  */
 public class MyBucketListRelatedTagFragment extends FragmentBase<MyBucketListRelatedTagPresenter> {
+
+  private RecyclerView recyclerViewMyBucketRelatedTagList;
+
   @Nullable
   @Override
   public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@@ -33,6 +40,19 @@ public class MyBucketListRelatedTagFragment extends FragmentBase<MyBucketListRel
   @Override
   protected void onAfterActivityCreated(Bundle savedInstanceState) {
 
+    recyclerViewMyBucketRelatedTagList = findViewById(R.id.recycler_view_related_tag_list);
+    MyBucketListRelatedTagAdapter adapter = new MyBucketListRelatedTagAdapter(getActivity());
+    recyclerViewMyBucketRelatedTagList.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
+
+    recyclerViewMyBucketRelatedTagList.addItemDecoration(new RecyclerView.ItemDecoration() {
+      @Override
+      public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
+        super.getItemOffsets(outRect, view, parent, state);
+        outRect.bottom = ResourceUtil.dpToPx(21);
+      }
+    });
+    recyclerViewMyBucketRelatedTagList.setAdapter(adapter);
+
   }
 
   @Override

+ 37 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/fragment/bucketlist/MyBucketListRelatedTagViewHolder.java

@@ -0,0 +1,37 @@
+package kr.co.zumo.app.lifeplus.view.fragment.bucketlist;
+
+import android.support.v7.widget.RecyclerView;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+import kr.co.zumo.app.R;
+
+/**
+ * MyBuckeListRelatedTagViewHolder
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2018-10-19]   [최초 작성]
+ * @since 2018-10-19
+ */
+public class MyBucketListRelatedTagViewHolder extends RecyclerView.ViewHolder {
+
+  private ImageView imageVieRelatedTagImage;
+  private TextView textViewRelatedTagText;
+
+  public MyBucketListRelatedTagViewHolder(View itemView) {
+    super(itemView);
+    imageVieRelatedTagImage = itemView.findViewById(R.id.image_view_related_tag_image);
+    textViewRelatedTagText = itemView.findViewById(R.id.text_view_related_tag_text);
+  }
+
+  public void dataSetting(){
+    imageVieRelatedTagImage.setImageDrawable(itemView.getResources().getDrawable(R.drawable.img_bestbucket_banner_3));
+    textViewRelatedTagText.setText("더 속도감 있게!\n" +
+      "익스트림 액티비티");
+
+  }
+}

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/presenter/MyBucketListRelatedTagPresenter.java

@@ -49,7 +49,7 @@ public class MyBucketListRelatedTagPresenter extends Presenter<BlankModel, IView
 
   @Override
   public boolean onBackPressed() {
-    onCommand(new FragmentChangeCommand(ScreenID.MY_BUCKET, ScreenID.DIRECTION_BACK));
+    onCommand(new FragmentChangeCommand(ScreenID.ADD_MY_BUCKET, ScreenID.DIRECTION_BACK));
     return true;
   }
 

File diff suppressed because it is too large
+ 4 - 0
app/src/main/res/drawable/icon_bucket_complete_white.xml


+ 31 - 0
app/src/main/res/layout/bucket_related_tag_card_view.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+  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="wrap_content"
+  android:layout_marginStart="25dp"
+  android:orientation="horizontal">
+
+  <ImageView
+    android:id="@+id/image_view_related_tag_image"
+    android:layout_width="124dp"
+    android:layout_height="93dp"
+    app:srcCompat="@drawable/img_bestbucket_banner_3"
+    android:scaleType="center"
+    />
+
+  <TextView
+    android:id="@+id/text_view_related_tag_text"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:layout_gravity="center"
+    android:layout_marginStart="18dp"
+    android:lineSpacingExtra="5.4sp"
+    android:textColor="#000000"
+    android:textSize="14sp"
+    tools:text="더 속도감 있게!
+익스트림 액티비티"
+    />
+</LinearLayout>

+ 177 - 4
app/src/main/res/layout/fragment_my_bucket_list_related_tag.xml

@@ -1,6 +1,179 @@
 <?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">
+<LinearLayout
+  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:orientation="vertical">
 
-</android.support.constraint.ConstraintLayout>
+  <RelativeLayout
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:background="@drawable/img_bestbucket_banner_5">
+
+    <ImageView
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_centerVertical="true"
+      android:layout_marginEnd="5dp"
+      android:layout_toStartOf="@+id/text_view_select_bucket"
+      app:srcCompat="@drawable/icon_bucket_complete_white"/>
+
+    <TextView
+      android:id="@+id/text_view_select_bucket"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_centerInParent="true"
+      android:gravity="center_horizontal"
+      android:lineSpacingExtra="8sp"
+      android:text="@string/bucket_select_text10"
+      android:textColor="#ffffff"
+      android:textSize="21sp"/>
+
+  </RelativeLayout>
+
+  <LinearLayout
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="24dp"
+    android:layout_marginTop="30dp"
+    android:orientation="vertical">
+
+    <TextView
+      android:layout_width="match_parent"
+      android:layout_height="wrap_content"
+      android:lineSpacingExtra="4sp"
+      android:text="연관태그 추천 콘텐츠 31개"
+      android:textColor="@color/C999999"
+      android:textSize="12sp"
+      />
+
+  </LinearLayout>
+
+  <HorizontalScrollView
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginStart="25dp"
+    android:layout_marginTop="13dp"
+    android:scrollbars=""
+    >
+
+    <LinearLayout
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:orientation="horizontal"
+      >
+
+      <CheckBox
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="9dp"
+        android:background="@drawable/custom_rectangle_radio_selector"
+        android:button="@null"
+        android:lineSpacingExtra="4sp"
+        android:paddingStart="12dp"
+        android:paddingTop="5dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="5dp"
+        android:text="#배낭여행"
+        android:textAlignment="center"
+        android:textColor="@drawable/my_faq_radio_text_selector"
+        android:textSize="12sp"
+        />
+
+      <CheckBox
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="9dp"
+        android:background="@drawable/custom_rectangle_radio_selector"
+        android:button="@null"
+        android:lineSpacingExtra="4sp"
+        android:paddingStart="12dp"
+        android:paddingTop="5dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="5dp"
+        android:text="#북유럽"
+        android:textAlignment="center"
+        android:textColor="@drawable/my_faq_radio_text_selector"
+        android:textSize="12sp"
+        />
+
+      <CheckBox
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="9dp"
+        android:background="@drawable/custom_rectangle_radio_selector"
+        android:button="@null"
+        android:lineSpacingExtra="4sp"
+        android:paddingStart="12dp"
+        android:paddingTop="5dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="5dp"
+        android:text="#배낭여행"
+        android:textAlignment="center"
+        android:textColor="@drawable/my_faq_radio_text_selector"
+        android:textSize="12sp"
+        />
+
+      <CheckBox
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="9dp"
+        android:background="@drawable/custom_rectangle_radio_selector"
+        android:button="@null"
+        android:lineSpacingExtra="4sp"
+        android:paddingStart="12dp"
+        android:paddingTop="5dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="5dp"
+        android:text="#배낭여행"
+        android:textAlignment="center"
+        android:textColor="@drawable/my_faq_radio_text_selector"
+        android:textSize="12sp"
+        />
+
+      <CheckBox
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="9dp"
+        android:background="@drawable/custom_rectangle_radio_selector"
+        android:button="@null"
+        android:lineSpacingExtra="4sp"
+        android:paddingStart="12dp"
+        android:paddingTop="5dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="5dp"
+        android:text="#배낭여행"
+        android:textAlignment="center"
+        android:textColor="@drawable/my_faq_radio_text_selector"
+        android:textSize="12sp"
+        />
+
+      <CheckBox
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginEnd="9dp"
+        android:background="@drawable/custom_rectangle_radio_selector"
+        android:button="@null"
+        android:lineSpacingExtra="4sp"
+        android:paddingStart="12dp"
+        android:paddingTop="5dp"
+        android:paddingEnd="12dp"
+        android:paddingBottom="5dp"
+        android:text="#배낭여행"
+        android:textAlignment="center"
+        android:textColor="@drawable/my_faq_radio_text_selector"
+        android:textSize="12sp"
+        />
+    </LinearLayout>
+  </HorizontalScrollView>
+
+  <android.support.v7.widget.RecyclerView
+    android:id="@+id/recycler_view_related_tag_list"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:layout_marginTop="25dp"/>
+
+
+</LinearLayout>