Browse Source

[카테고리메인][Common] 카테고리메인 필터 수정사항 반영

Hasemi 7 years ago
parent
commit
9aa8dea4c2

+ 4 - 20
app/src/main/java/kr/co/zumo/app/lifeplus/view/dialog/CategoryFirstMainFilterDialog.java

@@ -31,7 +31,6 @@ public class CategoryFirstMainFilterDialog extends DialogBase<ICustomFilterListe
   private ArrayList<CustomSquareCheckBox> firstCategoryCheckboxList;
   private ArrayList<CustomSquareCheckBox> secondCategoryCheckboxList;
   private ArrayList<CustomSquareCheckBox> thirdCategoryCheckBoxList;
-  private ArrayList<CustomSquareCheckBox> fourthCategoryCheckBoxList;
   private CustomSquareCheckBox fifthCategoryCheckBox;
 
   private ArrayList<FilterBean> data;
@@ -81,6 +80,10 @@ public class CategoryFirstMainFilterDialog extends DialogBase<ICustomFilterListe
     firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_3)));
     firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_4)));
     firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_5)));
+    firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_6)));
+    firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_7)));
+    firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_8)));
+    firstCategoryCheckboxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_first_check_9)));
 
 
     //동반 유형
@@ -99,15 +102,6 @@ public class CategoryFirstMainFilterDialog extends DialogBase<ICustomFilterListe
     thirdCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_third_check_5)));
     thirdCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_third_check_6)));
 
-    //활동상황
-    fourthCategoryCheckBoxList = new ArrayList<>();
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_1)));
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_2)));
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_3)));
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_4)));
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_5)));
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_6)));
-    fourthCategoryCheckBoxList.add(((CustomSquareCheckBox) getView().findViewById(R.id.filter_fourth_check_7)));
 
     //주차여부
     fifthCategoryCheckBox = ((CustomSquareCheckBox) getView().findViewById(R.id.filter_fifth_check_1));
@@ -141,13 +135,6 @@ public class CategoryFirstMainFilterDialog extends DialogBase<ICustomFilterListe
       }
     }
 
-    for (int i = 0; i < fourthCategoryCheckBoxList.size(); ++i) {
-      CustomSquareCheckBox fourthCategoryCheckBox = fourthCategoryCheckBoxList.get(i);
-      if (fourthCategoryCheckBox.isChecked()) {
-        data.add(new FilterBean(FilterBean.CATEGORY_FOURTH_ID, i, fourthCategoryCheckBox.getText()));
-      }
-    }
-
     //주차여부
     if (fifthCategoryCheckBox.isChecked()) {
       data.add(new FilterBean(FilterBean.CATEGORY_FIFTH_ID, 0, fifthCategoryCheckBox.getText()));
@@ -164,9 +151,6 @@ public class CategoryFirstMainFilterDialog extends DialogBase<ICustomFilterListe
     for (int i = 0; i < thirdCategoryCheckBoxList.size(); i++) {
       thirdCategoryCheckBoxList.get(i).setChecked(false);
     }
-    for (int i = 0; i < fourthCategoryCheckBoxList.size(); i++) {
-      fourthCategoryCheckBoxList.get(i).setChecked(false);
-    }
     fifthCategoryCheckBox.setChecked(false);
   }
 

+ 1 - 1
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type1/FirstCategoryMainPresenter.java

@@ -95,7 +95,7 @@ public class FirstCategoryMainPresenter extends CategoryMainPresenter<FirstCateg
 
             @Override
             public void onFilterResult(ArrayList<FilterBean> list) {
-              Log.w("APP# FirstCategoryMainPresenter | onFilterResult", "|" + list.get(0).getCheckedValue());
+              Log.w("APP# FirstCategoryMainPresenter | onFilterResult", "|" + list.size());
             }
           })
           .attribute((IAttribute<CategoryFirstMainFilterDialog>) dialog -> {})

+ 50 - 120
app/src/main/res/layout/dialog_category_first_main.xml

@@ -10,9 +10,10 @@
   <android.support.v4.widget.NestedScrollView
     android:id="@+id/scroll_view"
     android:layout_width="match_parent"
-    app:layout_constraintTop_toTopOf="parent"
+    android:layout_height="0dp"
     app:layout_constraintBottom_toTopOf="@+id/layout_last"
-    android:layout_height="0dp">
+    app:layout_constraintTop_toTopOf="parent"
+    tools:layout_editor_absoluteX="0dp">
 
     <android.support.constraint.ConstraintLayout
       android:id="@+id/layout_container"
@@ -142,6 +143,50 @@
           app:checkBoxText="@string/first_filter_case_1_contents_5"
           app:layout_constraintStart_toEndOf="@+id/filter_first_check_4"/>
 
+        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
+          android:id="@+id/filter_first_check_6"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="7dp"
+          app:checkBoxText="@string/second_filter_case_4_contents_5"
+          app:layout_constraintStart_toEndOf="@+id/filter_first_check_5"/>
+
+        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
+          android:id="@+id/filter_first_check_7"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="7dp"
+          app:checkBoxText="@string/second_filter_case_4_contents_7"
+          app:layout_constraintStart_toEndOf="@+id/filter_first_check_6"/>
+
+      </android.support.constraint.ConstraintLayout>
+
+      <android.support.constraint.ConstraintLayout
+        android:id="@+id/layout_third_main_2"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="25dp"
+        android:layout_marginTop="9dp"
+        android:layout_marginBottom="43dp"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/layout_third_main">
+
+
+        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
+          android:id="@+id/filter_first_check_8"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          app:checkBoxText="@string/inside"
+          app:layout_constraintStart_toStartOf="parent"/>
+
+
+        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
+          android:id="@+id/filter_first_check_9"
+          android:layout_width="wrap_content"
+          android:layout_height="wrap_content"
+          android:layout_marginStart="7dp"
+          app:checkBoxText="@string/outside"
+          app:layout_constraintStart_toEndOf="@+id/filter_first_check_8"/>
       </android.support.constraint.ConstraintLayout>
 
       <android.support.constraint.ConstraintLayout
@@ -149,11 +194,11 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_marginStart="25dp"
-        android:layout_marginTop="44dp"
+        android:layout_marginTop="43dp"
         android:layout_marginEnd="25dp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/layout_third_main"
+        app:layout_constraintTop_toBottomOf="@+id/layout_third_main_2"
         >
 
         <TextView
@@ -320,121 +365,6 @@
 
       </android.support.constraint.ConstraintLayout>
 
-      <android.support.constraint.ConstraintLayout
-        android:id="@+id/layout_tenth_main"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="25dp"
-        android:layout_marginTop="43dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/layout_ninth_main">
-
-        <TextView
-          android:id="@+id/text_view_filter_fourth_case"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_marginStart="24dp"
-          android:layout_marginTop="44dp"
-          android:lineSpacingExtra="6sp"
-          android:text="@string/second_filter_case_4"
-          android:textColor="@color/C000000"
-          android:textSize="15sp"/>
-
-      </android.support.constraint.ConstraintLayout>
-
-      <android.support.constraint.ConstraintLayout
-        android:id="@+id/layout_eleventh_main"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="25dp"
-        android:layout_marginTop="13dp"
-        android:layout_marginEnd="25dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/layout_tenth_main"
-        >
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_1"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_marginEnd="9dp"
-          app:checkBoxText="@string/second_filter_case_4_contents_1"
-          app:layout_constraintEnd_toStartOf="@+id/filter_fourth_check_2"
-          app:layout_constraintStart_toStartOf="parent"/>
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_2"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          app:checkBoxText="@string/second_filter_case_4_contents_2"
-          app:layout_constraintEnd_toStartOf="@+id/filter_fourth_check_3"/>
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_3"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_marginStart="9dp"
-          app:checkBoxText="@string/second_filter_case_4_contents_3"
-          app:layout_constraintStart_toEndOf="@+id/filter_fourth_check_2"/>
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_4"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_marginStart="7dp"
-          android:clickable="true"
-          android:focusable="true"
-
-          app:checkBoxText="@string/second_filter_case_4_contents_4"
-          app:layout_constraintStart_toEndOf="@+id/filter_fourth_check_3"/>
-      </android.support.constraint.ConstraintLayout>
-
-      <android.support.constraint.ConstraintLayout
-        android:id="@+id/layout_twelve_main"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginStart="25dp"
-        android:layout_marginTop="9dp"
-        android:layout_marginEnd="25dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/layout_eleventh_main">
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_5"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_marginEnd="7dp"
-          android:clickable="true"
-          android:focusable="true"
-          app:checkBoxText="@string/second_filter_case_4_contents_5"
-          app:layout_constraintEnd_toStartOf="@+id/filter_fourth_check_6"
-          app:layout_constraintStart_toStartOf="parent"/>
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_6"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:clickable="true"
-          android:focusable="true"
-          app:checkBoxText="@string/second_filter_case_4_contents_6"
-          app:layout_constraintEnd_toStartOf="@+id/filter_fourth_check_7"
-          app:layout_constraintStart_toEndOf="@+id/filter_fourth_check_5"
-          />
-
-        <kr.co.zumo.app.lifeplus.view.custom.CustomSquareCheckBox
-          android:id="@+id/filter_fourth_check_7"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_marginStart="7dp"
-          android:clickable="true"
-          android:focusable="true"
-          app:checkBoxText="@string/second_filter_case_4_contents_7"
-          app:layout_constraintStart_toEndOf="@+id/filter_fourth_check_6"/>
-      </android.support.constraint.ConstraintLayout>
-
       <android.support.constraint.ConstraintLayout
         android:id="@+id/layout_thirteen_main"
         android:layout_width="match_parent"
@@ -443,7 +373,7 @@
         android:layout_marginTop="43dp"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@+id/layout_twelve_main">
+        app:layout_constraintTop_toBottomOf="@+id/layout_ninth_main">
 
         <TextView
           android:layout_width="wrap_content"

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

@@ -635,4 +635,7 @@
   <string name="app_review_message">Lifeplus에 대해 만족하시나요?\n앱에 대한 별점 리뷰를 남겨주시겠어요?</string>
   <string name="next_time">다음 기회에</string>
   <string name="app_review_write">앱 리뷰 쓰기</string>
+
+  <string name="inside">실내</string>
+  <string name="outside">실외</string>
 </resources>