Selaa lähdekoodia

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

hyodong.min 7 vuotta sitten
vanhempi
commit
463b01bb6e

+ 33 - 11
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/my/main/MyMainFragment.java

@@ -132,7 +132,6 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
     findViewById(R.id.text_view_purchase).setOnClickListener(view -> {presenter.onEvent(new Event.Builder(Event.MY_PURCHASE_HISTORY).build());});
 
 
-
     textViewConfirmUser.setOnClickListener(view -> { presenter.onEvent(new Event.Builder(Event.SIGN_UP).build());});
     findViewById(R.id.image_view_coupon_mall).setOnClickListener(view -> { presenter.onEvent(new Event.Builder(Event.COUPON_MALL).build());});
 
@@ -257,14 +256,17 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
       textViewBucketCardViewTitle1.setText(myBucketBeans.get(0).getTitle());
       layoutBucketCardView1.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.DETAIL).index(0).build()));
 
-      if(myBucketBeans.get(0).isCompleted()){
-        layoutBucketCardView1.setBackgroundColor( getResources().getColor(R.color.CE5E5E5));
-      }else{
+      if (myBucketBeans.get(0).isCompleted()) {
+        layoutBucketCardView1.setBackgroundColor(getResources().getColor(R.color.CE5E5E5));
+      }
+      else {
         layoutBucketCardView1.setBackground(getResources().getDrawable(R.drawable.faq_answer_border));
       }
 
       imageViewCheckedBucket1.setVisibility(myBucketBeans.get(0).isCompleted() ? View.VISIBLE : View.INVISIBLE);
-
+      if (myBucketBeans.get(0).getTagList().size() == 1) {
+        textViewBucket1HashTag1.setText(myBucketBeans.get(0).getTagList().get(0).getTagName());
+      }
 
     }
     else {
@@ -276,20 +278,40 @@ public abstract class MyMainFragment extends FragmentBase<MyMainPresenter> imple
       layoutBucketCardView1.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.DETAIL).index(0).build()));
       layoutBucketCardView2.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.DETAIL).index(1).build()));
 
-      if(myBucketBeans.get(0).isCompleted()){
-        layoutBucketCardView1.setBackgroundColor( getResources().getColor(R.color.CE5E5E5));
-      }else{
+      if (myBucketBeans.get(0).isCompleted()) {
+        layoutBucketCardView1.setBackgroundColor(getResources().getColor(R.color.CE5E5E5));
+      }
+      else {
         layoutBucketCardView1.setBackground(getResources().getDrawable(R.drawable.faq_answer_border));
       }
 
-      if(myBucketBeans.get(1).isCompleted()){
-        layoutBucketCardView2.setBackgroundColor( getResources().getColor(R.color.CE5E5E5));
-      }else{
+      if (myBucketBeans.get(1).isCompleted()) {
+        layoutBucketCardView2.setBackgroundColor(getResources().getColor(R.color.CE5E5E5));
+      }
+      else {
         layoutBucketCardView2.setBackground(getResources().getDrawable(R.drawable.faq_text_border));
       }
 
       imageViewCheckedBucket1.setVisibility(myBucketBeans.get(0).isCompleted() ? View.VISIBLE : View.INVISIBLE);
       imageViewCheckedBucket2.setVisibility(myBucketBeans.get(1).isCompleted() ? View.VISIBLE : View.INVISIBLE);
+
+
+      if (myBucketBeans.get(0).getTagList().size() == 1) {
+        textViewBucket1HashTag1.setText(myBucketBeans.get(0).getTagList().get(0).getTagName());
+      }
+      else if (myBucketBeans.get(0).getTagList().size() == 2) {
+        textViewBucket1HashTag1.setText(myBucketBeans.get(0).getTagList().get(0).getTagName());
+        textViewBucket1HashTag2.setText(myBucketBeans.get(0).getTagList().get(1).getTagName());
+      }
+
+      if (myBucketBeans.get(1).getTagList().size() == 1) {
+        textViewBucket2HashTag1.setText(myBucketBeans.get(0).getTagList().get(0).getTagName());
+        //textViewBucket1HashTag2.setText(myBucketBeans.get(0).getTagList().get(1).getTagName());
+      }
+      else if (myBucketBeans.get(1).getTagList().size() == 2) {
+        textViewBucket2HashTag1.setText(myBucketBeans.get(1).getTagList().get(0).getTagName());
+        textViewBucket2HashTag2.setText(myBucketBeans.get(1).getTagList().get(1).getTagName());
+      }
     }
 
   }

+ 13 - 9
app/src/main/res/layout/fragment_my_main.xml

@@ -594,6 +594,7 @@
 
     <android.support.constraint.ConstraintLayout
       android:id="@+id/layout_my_bucket_list_preview"
+      tools:visibility="visible"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_marginStart="25dp"
@@ -604,15 +605,20 @@
       app:layout_constraintStart_toStartOf="parent"
       app:layout_constraintTop_toBottomOf="@+id/layout_best_bucket">
 
+      <android.support.constraint.Guideline
+        android:id="@+id/guide_line"
+        android:layout_width="1dp"
+        android:orientation="vertical"
+        app:layout_constraintGuide_begin="148dp"
+        android:layout_height="match_parent"/>
       <android.support.constraint.ConstraintLayout
         android:id="@+id/my_bucket_list_card_view1"
         android:layout_width="148dp"
         android:layout_height="148dp"
         android:background="@drawable/faq_text_border"
-        app:layout_constraintEnd_toStartOf="@+id/my_bucket_list_card_view2"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintHorizontal_chainStyle="spread"
-        app:layout_constraintStart_toStartOf="parent">
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintEnd_toStartOf="@+id/guide_line"
+        >
 
         <TextView
           android:id="@+id/text_view_my_bucket_title1"
@@ -678,13 +684,11 @@
 
       <android.support.constraint.ConstraintLayout
         android:id="@+id/my_bucket_list_card_view2"
-        android:layout_width="148dp"
+        android:layout_width="143dp"
         android:layout_height="148dp"
         android:background="@drawable/faq_text_border"
         app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintHorizontal_bias="0.5"
-        app:layout_constraintHorizontal_chainStyle="spread_inside"
-        app:layout_constraintStart_toEndOf="@+id/my_bucket_list_card_view1">
+        app:layout_constraintStart_toEndOf="@+id/guide_line">
 
         <TextView
           android:id="@+id/text_view_my_bucket_title2"
@@ -747,7 +751,7 @@
           app:layout_constraintEnd_toStartOf="@+id/text_view_my_bucket_title2"
           app:layout_constraintStart_toStartOf="parent"
           app:layout_constraintTop_toTopOf="@+id/text_view_my_bucket_title2"
-          app:srcCompat="@drawable/icon_bucket_complete"/>\
+          app:srcCompat="@drawable/icon_bucket_complete"/>
       </android.support.constraint.ConstraintLayout>
     </android.support.constraint.ConstraintLayout>
 

+ 2 - 2
app/src/main/res/layout/image_and_text_contents.xml

@@ -3,7 +3,7 @@
   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="61dp"
+  android:layout_width="wrap_content"
   android:layout_height="wrap_content"
   android:gravity="center"
   android:orientation="vertical">
@@ -18,7 +18,7 @@
 
   <TextView
     android:id="@+id/text_view_main_contents"
-    android:layout_width="68dp"
+    android:layout_width="61dp"
     android:layout_height="wrap_content"
     android:layout_marginTop="13dp"
     android:gravity="center_horizontal"