Browse Source

[카테고리메인][Common] 콘텐츠 필터링시 결과 없을때 레이아웃 구성

Hasemi 7 years ago
parent
commit
e5fef38a00

+ 6 - 0
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/CategoryMainFragment.java

@@ -14,6 +14,7 @@ import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.Space;
 import android.widget.Spinner;
+import android.widget.TextView;
 
 import java.util.Arrays;
 import java.util.List;
@@ -47,6 +48,8 @@ public abstract class CategoryMainFragment<P extends CategoryMainPresenter> exte
   protected Spinner spinnerOrder;
   protected FocusArrayAdapter arrayAdapter;
   protected Space space;
+  protected ImageView imageViewContentsNothing;
+  protected TextView textViewContentsNothing;
 
 
   @Override
@@ -66,6 +69,9 @@ public abstract class CategoryMainFragment<P extends CategoryMainPresenter> exte
     appBarLayout = findViewById(R.id.app_bar_layout);
     addItemDecoration();
 
+    textViewContentsNothing = findViewById(R.id.text_view_contents_nothing);
+    imageViewContentsNothing = findViewById(R.id.image_view_contents_nothing);
+
     /*스피너*/
     spinnerOrder = findViewById(R.id.spinner_select_contents);
     spinnerOrder.setAdapter(arrayAdapter);

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


+ 34 - 4
app/src/main/res/layout/fragment_category_main.xml

@@ -42,12 +42,14 @@
         app:layout_collapseMode="pin"
         tools:visibility="gone"
         />
+
       <Space
         android:id="@+id/space"
         android:layout_width="match_parent"
         android:layout_height="23dp"
         android:visibility="gone"
         tools:visibility="visible"/>
+
       <RelativeLayout
         android:id="@+id/relative_layout_spinner_filter"
         android:layout_width="wrap_content"
@@ -87,7 +89,7 @@
     </android.support.design.widget.CollapsingToolbarLayout>
   </android.support.design.widget.AppBarLayout>
 
-  <LinearLayout
+  <android.support.constraint.ConstraintLayout
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:descendantFocusability="blocksDescendants"
@@ -97,9 +99,37 @@
     <android.support.v7.widget.RecyclerView
       android:id="@+id/recycler_view_category_main"
       android:layout_width="match_parent"
-      android:layout_height="wrap_content"
+      android:layout_height="0dp"
       android:layout_gravity="bottom"
       android:clipToPadding="false"
-      />
-  </LinearLayout>
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toTopOf="parent"/>
+
+    <ImageView
+      android:id="@+id/image_view_contents_nothing"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="92dp"
+      android:visibility="gone"
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toTopOf="parent"
+      app:srcCompat="@drawable/icon_contents_nothing_copy"/>
+
+    <TextView
+      android:id="@+id/text_view_contents_nothing"
+      android:layout_width="wrap_content"
+      android:layout_height="wrap_content"
+      android:layout_marginTop="18dp"
+      android:gravity="center_horizontal"
+      android:lineSpacingExtra="6sp"
+      android:text="@string/category_main_filter_nothing"
+      android:textColor="@color/CC5C5C5"
+      android:textSize="14sp"
+      android:visibility="gone"
+      app:layout_constraintEnd_toEndOf="parent"
+      app:layout_constraintStart_toStartOf="parent"
+      app:layout_constraintTop_toBottomOf="@+id/image_view_contents_nothing"/>
+  </android.support.constraint.ConstraintLayout>
 </android.support.design.widget.CoordinatorLayout>

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

@@ -563,6 +563,7 @@
   <string name="main_fifth_category_date">2018.09.17 ~ 2018.09.23</string>
   <string name="main_fifth_category_contents">9월 3주차\n뮤지컬 예매순위 TOP 10</string>
   <string name="main_second_category_title">디즈니랜드 여행</string>
+  <string name="category_main_filter_nothing">콘텐츠를 준비하고 있습니다.
\n다른 필터로 적용해주세요.</string>
 
   <string name="series">시리즈</string>