Parcourir la source

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

hyodong.min il y a 7 ans
Parent
commit
f5f38fa209

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

@@ -0,0 +1,149 @@
+package kr.co.zumo.app.lifeplus.view.screen.category;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.design.widget.AppBarLayout;
+import android.support.design.widget.CoordinatorLayout;
+import android.support.v7.widget.RecyclerView;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.ImageView;
+import android.widget.RelativeLayout;
+import android.widget.Space;
+import android.widget.Spinner;
+
+import java.util.Arrays;
+import java.util.List;
+
+import kr.co.zumo.app.R;
+import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
+import kr.co.zumo.app.lifeplus.util.ResourceUtil;
+import kr.co.zumo.app.lifeplus.view.Event;
+import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView;
+import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
+
+/**
+ * CategoryMainFragment
+ * <pre>
+ * </pre>
+ *
+ * @author 하세미
+ * @version 1.0
+ * @history 하세미   [2018-12-19]   [최초 작성]
+ * @since 2018-12-19
+ */
+public abstract class CategoryMainFragment<P extends CategoryMainPresenter> extends FragmentBase<P> {
+
+  protected MainSeriesView mainSeriesView;
+  protected RecyclerView recyclerView;
+  protected RelativeLayout relativeLayoutSpinnerFilter;
+  protected ImageView imageViewFilter;
+  protected CoordinatorLayout layoutRoot;
+  protected AppBarLayout appBarLayout;
+  protected View viewFilter;
+  protected Spinner spinnerOrder;
+  protected FocusArrayAdapter arrayAdapter;
+  protected Space space;
+
+
+  @Override
+  protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
+    return inflater.inflate(R.layout.fragment_category_main, container, false);
+  }
+
+  @Override
+  protected void onAfterActivityCreated(Bundle savedInstanceState) {
+    recyclerView = findViewById(R.id.recycler_view_category_main);
+    space = findViewById(R.id.space);
+    mainSeriesView = findViewById(R.id.series_image_text_view);
+    relativeLayoutSpinnerFilter = findViewById(R.id.relative_layout_spinner_filter);
+    List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
+    arrayAdapter = new FocusArrayAdapter(getActivity(), R.layout.custom_spinner, spinnerList);
+    layoutRoot = findViewById(R.id.root_layout);
+    appBarLayout = findViewById(R.id.app_bar_layout);
+    addItemDecoration();
+
+    /*스피너*/
+    spinnerOrder = findViewById(R.id.spinner_select_contents);
+    spinnerOrder.setAdapter(arrayAdapter);
+    imageViewFilter = findViewById(R.id.first_category_main_filter);
+    init();
+
+    imageViewFilter.setOnClickListener(view -> {
+      presenter.onEvent(new Event.Builder(Event.FILTER).build());
+    });
+
+    spinnerOrder.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+      @Override
+      public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+        arrayAdapter.setSelectedIndex(position);
+        presenter.onEvent(new Event.Builder(Event.ORDER).index(position).build());
+      }
+
+      @Override
+      public void onNothingSelected(AdapterView<?> parent) {}
+    });
+
+  }
+
+  @Override
+  protected void defineActionBar(ActionBarHelper actionBarHelper) {
+
+  }
+
+  @Override
+  protected P definePresenter() {
+    return null;
+  }
+
+  @Override
+  protected void onAfterDestroyView() {
+
+  }
+
+  @Override
+  protected void onAfterDestroy() {
+
+  }
+
+  @Override
+  protected boolean isSkipScreenWhenBack() {
+    return false;
+  }
+
+  private void init() {
+    switch (getCategoryNumber()) {
+      case CategoryID.CATEGORY_1:
+        relativeLayoutSpinnerFilter.setVisibility(View.GONE);
+        break;
+      case CategoryID.CATEGORY_2:
+        relativeLayoutSpinnerFilter.setVisibility(View.GONE);
+        break;
+      case CategoryID.CATEGORY_3:
+        relativeLayoutSpinnerFilter.setVisibility(View.GONE);
+        imageViewFilter.setVisibility(View.INVISIBLE);
+        break;
+      case CategoryID.CATEGORY_4:
+        relativeLayoutSpinnerFilter.setVisibility(View.GONE);
+        spinnerOrder.setVisibility(View.INVISIBLE);
+        break;
+      case CategoryID.CATEGORY_5:
+        relativeLayoutSpinnerFilter.setVisibility(View.GONE);
+        imageViewFilter.setVisibility(View.INVISIBLE);
+        spinnerOrder.setVisibility(View.INVISIBLE);
+        mainSeriesView.setVisibility(View.GONE);
+        break;
+      default:
+        break;
+
+    }
+  }
+
+  protected abstract String getCategoryNumber();
+
+  protected abstract void addItemDecoration();
+
+}

+ 23 - 66
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type1/FirstCategoryMainFragment.java

@@ -1,19 +1,8 @@
 package kr.co.zumo.app.lifeplus.view.screen.category.type1;
 
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.design.widget.AppBarLayout;
-import android.support.design.widget.CoordinatorLayout;
 import android.support.v7.widget.GridLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.LayoutInflater;
 import android.view.View;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.Spinner;
 
-import java.util.Arrays;
 import java.util.List;
 
 import kr.co.zumo.app.R;
@@ -25,10 +14,9 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.IMainSeriesContract;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesPresenter;
-import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView;
-import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryID;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryMainFragment;
 import kr.co.zumo.app.lifeplus.view.screen.category.CategorySortScroller;
-import kr.co.zumo.app.lifeplus.view.screen.category.FocusArrayAdapter;
 import kr.co.zumo.app.lifeplus.view.screen.category.GridItemDecoration;
 import kr.co.zumo.app.lifeplus.view.screen.category.IFirstCategoryMainView;
 
@@ -42,37 +30,11 @@ import kr.co.zumo.app.lifeplus.view.screen.category.IFirstCategoryMainView;
  * @history 하세미   [2018-10-22]   [최초 작성]
  * @since 2018-10-22
  */
-public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPresenter> implements IFirstCategoryMainView {
+public class FirstCategoryMainFragment extends CategoryMainFragment<FirstCategoryMainPresenter> implements IFirstCategoryMainView {
 
-  private CoordinatorLayout layoutRoot;
-  private AppBarLayout appBarLayout;
-  private MainSeriesView mainSeriesView;
-  private RecyclerView recyclerViewFirstCategoryMain;
-  private View viewFilter;
   private IMainSeriesContract.Presenter seriesPresenter;
-  private Spinner spinnerOrder;
   private FirstCategoryMainAdapter adapter;
-  private FocusArrayAdapter arrayAdapter;
-
-  @Nullable
-  @Override
-  protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
-    return inflater.inflate(R.layout.fragment_category_main_first, container, false);
-  }
-
-  @Override
-  protected void onAfterActivityCreated(Bundle savedInstanceState) {
-    layoutRoot = findViewById(R.id.root_layout);
-    appBarLayout = findViewById(R.id.app_bar_layout);
-    mainSeriesView = findViewById(R.id.series_image_text_view);
-    recyclerViewFirstCategoryMain = findViewById(R.id.recycler_view_first_category_main);
-    recyclerViewFirstCategoryMain.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(4),ResourceUtil.dpToPx(4),ResourceUtil.dpToPx(4),ResourceUtil.dpToPx(4)));
-    viewFilter = findViewById(R.id.first_category_main_filter);
-    spinnerOrder = findViewById(R.id.spinner_select_contents);
-    List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
-    arrayAdapter = new FocusArrayAdapter(getActivity(), R.layout.custom_spinner, spinnerList);
-    spinnerOrder.setAdapter(arrayAdapter);
-  }
+  private GridLayoutManager gridLayoutManager;
 
   @Override
   protected void defineActionBar(ActionBarHelper actionBarHelper) {
@@ -95,7 +57,7 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
       spinnerOrder.setOnItemSelectedListener(null);
       spinnerOrder = null;
     }
-    recyclerViewFirstCategoryMain = null;
+    recyclerView = null;
     mainSeriesView = null;
     if (null != viewFilter) {
       viewFilter.setOnClickListener(null);
@@ -118,13 +80,13 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
   }
 
   @Override
-  public void drawContentsBanner(List<CategoryBannerBean> bannerBeans, List<CategoryContentsBean> contentsBeans) {
-
-    adapter = new FirstCategoryMainAdapter(getActivity(), bannerBeans, contentsBeans, (Event event) -> {
-      presenter.onEvent(event);
-    });
+  protected String getCategoryNumber() {
+    return CategoryID.CATEGORY_1;
+  }
 
-    GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
+  @Override
+  protected void addItemDecoration() {
+    gridLayoutManager = new GridLayoutManager(getActivity(), 2);
     gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
       @Override
       public int getSpanSize(int position) {
@@ -141,23 +103,20 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
         return 0;
       }
     });
-    recyclerViewFirstCategoryMain.setLayoutManager(gridLayoutManager);
-    recyclerViewFirstCategoryMain.setAdapter(adapter);
+    recyclerView.setLayoutManager(gridLayoutManager);
+  }
+
+  @Override
+  public void drawContentsBanner(List<CategoryBannerBean> bannerBeans, List<CategoryContentsBean> contentsBeans) {
 
-    viewFilter.setOnClickListener(view -> {
-      presenter.onEvent(new Event.Builder(Event.FILTER).build());
+    adapter = new FirstCategoryMainAdapter(getActivity(), bannerBeans, contentsBeans, (Event event) -> {
+      presenter.onEvent(event);
     });
 
-    spinnerOrder.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-      @Override
-      public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-        arrayAdapter.setSelectedIndex(position);
-        presenter.onEvent(new Event.Builder(Event.ORDER).index(position).build());
-      }
+    recyclerView.setPadding(ResourceUtil.dpToPx(21), 0, ResourceUtil.dpToPx(21), 0);
+    recyclerView.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(4), ResourceUtil.dpToPx(4), ResourceUtil.dpToPx(4), ResourceUtil.dpToPx(4)));
+    recyclerView.setAdapter(adapter);
 
-      @Override
-      public void onNothingSelected(AdapterView<?> parent) {}
-    });
 
   }
 
@@ -172,8 +131,7 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
   @Override
   public void updateContents(List<CategoryContentsBean> contentsBeans) {
     adapter.update(contentsBeans);
-    recyclerViewFirstCategoryMain.scrollToPosition(0);
-
+    recyclerView.scrollToPosition(0);
     CategorySortScroller scroller = new CategorySortScroller(layoutRoot, appBarLayout);
     scroller.doAppBarLayoutInitialization();
 
@@ -181,8 +139,7 @@ public class FirstCategoryMainFragment extends FragmentBase<FirstCategoryMainPre
 
   @Override
   public void hideRecommendArea() {
+    space.setVisibility(View.VISIBLE);
     mainSeriesView.setVisibility(View.GONE);
-    // TODO: 추후개발 예정
-    recyclerViewFirstCategoryMain.setPadding(0,ResourceUtil.dpToPx(19), 0,0);
   }
 }

+ 25 - 66
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type2/SecondCategoryMainFragment.java

@@ -1,20 +1,10 @@
 package kr.co.zumo.app.lifeplus.view.screen.category.type2;
 
 import android.graphics.Rect;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.design.widget.AppBarLayout;
-import android.support.design.widget.CoordinatorLayout;
 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 android.widget.AdapterView;
-import android.widget.Spinner;
 
-import java.util.Arrays;
 import java.util.List;
 
 import kr.co.zumo.app.R;
@@ -26,10 +16,9 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.IMainSeriesContract;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesPresenter;
-import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView;
-import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryID;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryMainFragment;
 import kr.co.zumo.app.lifeplus.view.screen.category.CategorySortScroller;
-import kr.co.zumo.app.lifeplus.view.screen.category.FocusArrayAdapter;
 import kr.co.zumo.app.lifeplus.view.screen.category.ISecondCategoryMainView;
 
 
@@ -43,43 +32,10 @@ import kr.co.zumo.app.lifeplus.view.screen.category.ISecondCategoryMainView;
  * @history 하세미   [2018-10-24]   [최초 작성]
  * @since 2018-10-24
  */
-public class SecondCategoryMainFragment extends FragmentBase<SecondCategoryMainPresenter> implements ISecondCategoryMainView {
+public class SecondCategoryMainFragment extends CategoryMainFragment<SecondCategoryMainPresenter> implements ISecondCategoryMainView {
 
-  private CoordinatorLayout layoutRoot;
-  private AppBarLayout appBarLayout;
-  private RecyclerView recyclerViewSecondCategoryMain;
-  private MainSeriesView mainSeriesView;
-  private View viewFilter;
   private IMainSeriesContract.Presenter seriesPresenter;
-  private Spinner spinnerOrder;
   private SecondCategoryMainAdapter adapter;
-  private FocusArrayAdapter arrayAdapter;
-
-
-  @Override
-  protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
-    return inflater.inflate(R.layout.fragment_category_main_second, container, false);
-  }
-
-  @Override
-  protected void onAfterActivityCreated(Bundle savedInstanceState) {
-    layoutRoot = findViewById(R.id.root_layout);
-    appBarLayout = findViewById(R.id.app_bar_layout);
-    mainSeriesView = findViewById(R.id.series_image_text_view);
-
-    recyclerViewSecondCategoryMain = findViewById(R.id.recycler_view_second_category_main);
-    recyclerViewSecondCategoryMain.addItemDecoration(new RecyclerView.ItemDecoration() {
-      @Override
-      public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
-        outRect.bottom = ResourceUtil.dpToPx(7);
-      }
-    });
-    viewFilter = findViewById(R.id.second_category_main_filter);
-    spinnerOrder = findViewById(R.id.spinner_select_contents);
-    List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
-    arrayAdapter = new FocusArrayAdapter(getActivity(), R.layout.custom_spinner, spinnerList);
-    spinnerOrder.setAdapter(arrayAdapter);}
-
 
   @Override
   protected void defineActionBar(ActionBarHelper actionBarHelper) {
@@ -107,7 +63,7 @@ public class SecondCategoryMainFragment extends FragmentBase<SecondCategoryMainP
       spinnerOrder.setOnItemSelectedListener(null);
       spinnerOrder = null;
     }
-    recyclerViewSecondCategoryMain = null;
+    recyclerView = null;
     mainSeriesView = null;
     if (null != viewFilter) {
       viewFilter.setOnClickListener(null);
@@ -125,11 +81,26 @@ public class SecondCategoryMainFragment extends FragmentBase<SecondCategoryMainP
   }
 
 
+  @Override
+  protected String getCategoryNumber() {
+    return CategoryID.CATEGORY_2;
+  }
+
+  @Override
+  protected void addItemDecoration() {
+    recyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {
+      @Override
+      public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
+        outRect.bottom = ResourceUtil.dpToPx(7);
+      }
+    });
+  }
+
+
   @Override
   public void hideRecommendArea() {
     mainSeriesView.setVisibility(View.GONE);
-    // TODO: 추후개발 예정
-    recyclerViewSecondCategoryMain.setPadding(ResourceUtil.dpToPx(25),ResourceUtil.dpToPx(23), ResourceUtil.dpToPx(25),0);
+    space.setVisibility(View.VISIBLE);
   }
 
   @Override
@@ -139,27 +110,15 @@ public class SecondCategoryMainFragment extends FragmentBase<SecondCategoryMainP
       presenter.onEvent(event);
     });
 
-    recyclerViewSecondCategoryMain.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
-    recyclerViewSecondCategoryMain.setAdapter(adapter);
-
-    viewFilter.setOnClickListener(view -> presenter.onEvent(new Event.Builder(Event.FILTER).build()));
-
-    spinnerOrder.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-      @Override
-      public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-        arrayAdapter.setSelectedIndex(position);
-        presenter.onEvent(new Event.Builder(Event.ORDER).index(position).build());
-      }
+    recyclerView.setPadding(ResourceUtil.dpToPx(25), 0, ResourceUtil.dpToPx(25), 0);
+    recyclerView.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false));
+    recyclerView.setAdapter(adapter);
 
-      @Override
-      public void onNothingSelected(AdapterView<?> parent) {}
-    });
   }
 
   @Override
   public void drawRecommend(List<CategoryRecommendBean> beans) {
     mainSeriesView.init(getActivity(), beans, beans.size());
-
     seriesPresenter = new MainSeriesPresenter(mainSeriesView, index -> {
       presenter.onEvent(new Event.Builder(Event.RECOMMEND).index(index).build());
     });
@@ -168,7 +127,7 @@ public class SecondCategoryMainFragment extends FragmentBase<SecondCategoryMainP
   @Override
   public void updateContents(List<CategoryContentsBean> contentsBeans) {
     adapter.update(contentsBeans);
-    recyclerViewSecondCategoryMain.scrollToPosition(0);
+    recyclerView.scrollToPosition(0);
 
     CategorySortScroller scroller = new CategorySortScroller(layoutRoot, appBarLayout);
     scroller.doAppBarLayoutInitialization();

+ 23 - 60
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type3/ThirdCategoryMainFragment.java

@@ -1,19 +1,9 @@
 package kr.co.zumo.app.lifeplus.view.screen.category.type3;
 
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.design.widget.AppBarLayout;
-import android.support.design.widget.CoordinatorLayout;
 import android.support.v7.widget.GridLayoutManager;
-import android.support.v7.widget.RecyclerView;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.Spinner;
 
-import java.util.Arrays;
 import java.util.List;
 
 import kr.co.zumo.app.R;
@@ -25,10 +15,9 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.IMainSeriesContract;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesPresenter;
-import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView;
-import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryID;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryMainFragment;
 import kr.co.zumo.app.lifeplus.view.screen.category.CategorySortScroller;
-import kr.co.zumo.app.lifeplus.view.screen.category.FocusArrayAdapter;
 import kr.co.zumo.app.lifeplus.view.screen.category.GridItemDecoration;
 import kr.co.zumo.app.lifeplus.view.screen.category.IThirdCategoryMainView;
 
@@ -42,38 +31,11 @@ import kr.co.zumo.app.lifeplus.view.screen.category.IThirdCategoryMainView;
  * @history 하세미   [2018-10-24]   [최초 작성]
  * @since 2018-10-24
  */
-public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPresenter> implements IThirdCategoryMainView {
+public class ThirdCategoryMainFragment extends CategoryMainFragment<ThirdCategoryMainPresenter> implements IThirdCategoryMainView {
 
-  private CoordinatorLayout layoutRoot;
-  private AppBarLayout appBarLayout;
-  private MainSeriesView mainSeriesView;
-  private RecyclerView recyclerViewThirdCategoryMain;
   private IMainSeriesContract.Presenter seriesPresenter;
-  private Spinner spinnerOrder;
-  private FocusArrayAdapter arrayAdapter;
   private ThirdCategoryMainAdapter adapter;
 
-
-  @Override
-  protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
-    return inflater.inflate(R.layout.fragment_category_main_third, container, false);
-  }
-
-  @Override
-  protected void onAfterActivityCreated(Bundle savedInstanceState) {
-    layoutRoot = findViewById(R.id.root_layout);
-    appBarLayout = findViewById(R.id.app_bar_layout);
-    mainSeriesView = findViewById(R.id.series_image_text_view);
-
-    recyclerViewThirdCategoryMain = findViewById(R.id.recycler_view_third_category_main);
-    recyclerViewThirdCategoryMain.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(8), ResourceUtil.dpToPx(13), ResourceUtil.dpToPx(8), ResourceUtil.dpToPx(13)));
-
-    spinnerOrder = findViewById(R.id.spinner_select_contents);
-    List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
-    arrayAdapter = new FocusArrayAdapter(getActivity(), R.layout.custom_spinner, spinnerList);
-    spinnerOrder.setAdapter(arrayAdapter);
-  }
-
   @Override
   protected void defineActionBar(ActionBarHelper actionBarHelper) {
     actionBarHelper.begin().title(R.string.contents_category3_action_bar_title)
@@ -96,7 +58,7 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
       spinnerOrder = null;
     }
     mainSeriesView = null;
-    recyclerViewThirdCategoryMain = null;
+    recyclerView = null;
     if (null != seriesPresenter) {
       seriesPresenter.dispose();
       seriesPresenter = null;
@@ -113,11 +75,24 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
     return false;
   }
 
+  @Override
+  protected String getCategoryNumber() {
+    return CategoryID.CATEGORY_3;
+  }
+
+  @Override
+  protected void addItemDecoration() {
+    recyclerView.addItemDecoration(new GridItemDecoration(getActivity(), ResourceUtil.dpToPx(8), ResourceUtil.dpToPx(13), ResourceUtil.dpToPx(8), ResourceUtil.dpToPx(13)));
+  }
+
   @Override
   public void hideRecommendArea() {
+    space.setVisibility(View.VISIBLE);
+    ViewGroup.LayoutParams params = space.getLayoutParams();
+    params.height = ResourceUtil.dpToPx(10);
+    space.setLayoutParams(params);
+    
     mainSeriesView.setVisibility(View.GONE);
-    // TODO: 추후개발 예정
-    recyclerViewThirdCategoryMain.setPadding(0, ResourceUtil.dpToPx(10), 0, 0);
   }
 
   @Override
@@ -125,6 +100,7 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
     adapter = new ThirdCategoryMainAdapter(getActivity(), bannerBeans, contents, event -> {
       presenter.onEvent(event);
     });
+    recyclerView.setPadding(ResourceUtil.dpToPx(25), 0, ResourceUtil.dpToPx(25), 0);
     GridLayoutManager gridLayoutManager = new GridLayoutManager(getActivity(), 2);
     gridLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
       @Override
@@ -142,25 +118,12 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
         return 0;
       }
     });
-    recyclerViewThirdCategoryMain.setLayoutManager(gridLayoutManager);
-    recyclerViewThirdCategoryMain.setAdapter(adapter);
-
-    spinnerOrder.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-      @Override
-      public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-        arrayAdapter.setSelectedIndex(position);
-        presenter.onEvent(new Event.Builder(Event.ORDER).index(position).build());
-      }
-
-      @Override
-      public void onNothingSelected(AdapterView<?> parent) {}
-    });
-
+    recyclerView.setLayoutManager(gridLayoutManager);
+    recyclerView.setAdapter(adapter);
   }
 
   @Override
   public void drawRecommend(List<CategoryRecommendBean> beans) {
-    ;
     mainSeriesView.init(getActivity(), beans, beans.size());
     seriesPresenter = new MainSeriesPresenter(mainSeriesView, index -> {
       presenter.onEvent(new Event.Builder(Event.RECOMMEND).index(index).build());
@@ -170,7 +133,7 @@ public class ThirdCategoryMainFragment extends FragmentBase<ThirdCategoryMainPre
   @Override
   public void updateContents(List<CategoryContentsBean> contentsBeans) {
     adapter.update(contentsBeans);
-    recyclerViewThirdCategoryMain.scrollToPosition(0);
+    recyclerView.scrollToPosition(0);
 
     CategorySortScroller scroller = new CategorySortScroller(layoutRoot, appBarLayout);
     scroller.doAppBarLayoutInitialization();

+ 25 - 62
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type4/FourthCategoryMainFragment.java

@@ -1,20 +1,10 @@
 package kr.co.zumo.app.lifeplus.view.screen.category.type4;
 
 import android.graphics.Rect;
-import android.os.Bundle;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.design.widget.AppBarLayout;
-import android.support.design.widget.CoordinatorLayout;
 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 android.widget.AdapterView;
-import android.widget.Spinner;
 
-import java.util.Arrays;
 import java.util.List;
 
 import kr.co.zumo.app.R;
@@ -26,10 +16,9 @@ import kr.co.zumo.app.lifeplus.util.ResourceUtil;
 import kr.co.zumo.app.lifeplus.view.Event;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.IMainSeriesContract;
 import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesPresenter;
-import kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView;
-import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryID;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryMainFragment;
 import kr.co.zumo.app.lifeplus.view.screen.category.CategorySortScroller;
-import kr.co.zumo.app.lifeplus.view.screen.category.FocusArrayAdapter;
 import kr.co.zumo.app.lifeplus.view.screen.category.IFourthCategoryMainView;
 
 /**
@@ -42,42 +31,11 @@ import kr.co.zumo.app.lifeplus.view.screen.category.IFourthCategoryMainView;
  * @history 하세미   [2018-10-24]   [최초 작성]
  * @since 2018-10-24
  */
-public class FourthCategoryMainFragment extends FragmentBase<FourthCategoryMainPresenter> implements IFourthCategoryMainView {
+public class FourthCategoryMainFragment extends CategoryMainFragment<FourthCategoryMainPresenter> implements IFourthCategoryMainView {
 
-  private CoordinatorLayout layoutRoot;
-  private AppBarLayout appBarLayout;
-  private MainSeriesView mainSeriesView;
-  private RecyclerView recyclerViewFourthCategoryMain;
   private IMainSeriesContract.Presenter seriesPresenter;
-  private Spinner spinnerOrder;
-  private FocusArrayAdapter arrayAdapter;
   private FourthCategoryMainAdapter adapter;
 
-  @Override
-  protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
-    return inflater.inflate(R.layout.fragment_category_main_fourth, container, false);
-  }
-
-  @Override
-  protected void onAfterActivityCreated(Bundle savedInstanceState) {
-    layoutRoot = findViewById(R.id.root_layout);
-    appBarLayout = findViewById(R.id.app_bar_layout);
-    mainSeriesView = findViewById(R.id.series_image_text_view);
-
-    recyclerViewFourthCategoryMain = findViewById(R.id.recycler_view_fourth_category_main);
-    recyclerViewFourthCategoryMain.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);
-      }
-    });
-
-    spinnerOrder = findViewById(R.id.spinner_select_contents);
-    List<String> spinnerList = Arrays.asList(ResourceUtil.getStringArray("main_filter"));
-    arrayAdapter = new FocusArrayAdapter(getActivity(), R.layout.custom_spinner, spinnerList);
-    spinnerOrder.setAdapter(arrayAdapter);
-  }
 
   @Override
   protected void defineActionBar(ActionBarHelper actionBarHelper) {
@@ -101,7 +59,7 @@ public class FourthCategoryMainFragment extends FragmentBase<FourthCategoryMainP
       spinnerOrder = null;
     }
     mainSeriesView = null;
-    recyclerViewFourthCategoryMain = null;
+    recyclerView = null;
     if (null != seriesPresenter) {
       seriesPresenter.dispose();
       seriesPresenter = null;
@@ -118,11 +76,26 @@ public class FourthCategoryMainFragment extends FragmentBase<FourthCategoryMainP
     return false;
   }
 
+  @Override
+  protected String getCategoryNumber() {
+    return CategoryID.CATEGORY_4;
+  }
+
+  @Override
+  protected void addItemDecoration() {
+    recyclerView.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);
+      }
+    });
+  }
+
   @Override
   public void hideRecommendArea() {
+    space.setVisibility(View.VISIBLE);
     mainSeriesView.setVisibility(View.GONE);
-    // TODO: 추후개발 예정
-    recyclerViewFourthCategoryMain.setPadding(ResourceUtil.dpToPx(25), ResourceUtil.dpToPx(23), ResourceUtil.dpToPx(25), 0);
   }
 
   @Override
@@ -131,19 +104,9 @@ public class FourthCategoryMainFragment extends FragmentBase<FourthCategoryMainP
       presenter.onEvent(event);
     });
     LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
-    recyclerViewFourthCategoryMain.setLayoutManager(linearLayoutManager);
-    recyclerViewFourthCategoryMain.setAdapter(adapter);
-
-    spinnerOrder.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
-      @Override
-      public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-        arrayAdapter.setSelectedIndex(position);
-        presenter.onEvent(new Event.Builder(Event.ORDER).index(position).build());
-      }
-
-      @Override
-      public void onNothingSelected(AdapterView<?> parent) {}
-    });
+    recyclerView.setPadding(ResourceUtil.dpToPx(25), 0, ResourceUtil.dpToPx(25), 0);
+    recyclerView.setLayoutManager(linearLayoutManager);
+    recyclerView.setAdapter(adapter);
   }
 
   @Override
@@ -157,7 +120,7 @@ public class FourthCategoryMainFragment extends FragmentBase<FourthCategoryMainP
   @Override
   public void updateContents(List<CategoryContentsBean> contentsBeans) {
     adapter.update(contentsBeans);
-    recyclerViewFourthCategoryMain.scrollToPosition(0);
+    recyclerView.scrollToPosition(0);
 
     CategorySortScroller scroller = new CategorySortScroller(layoutRoot, appBarLayout);
     scroller.doAppBarLayoutInitialization();

+ 25 - 29
app/src/main/java/kr/co/zumo/app/lifeplus/view/screen/category/type5/FifthCategoryMainFragment.java

@@ -1,14 +1,9 @@
 package kr.co.zumo.app.lifeplus.view.screen.category.type5;
 
 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 java.util.List;
 
@@ -18,7 +13,8 @@ import kr.co.zumo.app.lifeplus.bean.api.CategoryContentsBean;
 import kr.co.zumo.app.lifeplus.bean.api.CategoryRecommendBean;
 import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
 import kr.co.zumo.app.lifeplus.util.ResourceUtil;
-import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryID;
+import kr.co.zumo.app.lifeplus.view.screen.category.CategoryMainFragment;
 import kr.co.zumo.app.lifeplus.view.screen.category.IFifthCategoryMainView;
 
 /**
@@ -31,26 +27,7 @@ import kr.co.zumo.app.lifeplus.view.screen.category.IFifthCategoryMainView;
  * @history 하세미   [2018-10-24]   [최초 작성]
  * @since 2018-10-24
  */
-public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPresenter> implements IFifthCategoryMainView {
-
-  private RecyclerView recyclerViewFifthCategoryMain;
-
-  @Override
-  protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
-    return inflater.inflate(R.layout.fragment_category_main_fifth, container, false);
-  }
-
-  @Override
-  protected void onAfterActivityCreated(Bundle savedInstanceState) {
-    recyclerViewFifthCategoryMain = findViewById(R.id.recycler_view_fifth_category_main);
-    recyclerViewFifthCategoryMain.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(20);
-      }
-    });
-  }
+public class FifthCategoryMainFragment extends CategoryMainFragment<FifthCategoryMainPresenter> implements IFifthCategoryMainView {
 
   @Override
   protected void defineActionBar(ActionBarHelper actionBarHelper) {
@@ -69,7 +46,7 @@ public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPre
 
   @Override
   protected void onAfterDestroyView() {
-    recyclerViewFifthCategoryMain = null;
+    recyclerView = null;
   }
 
   @Override
@@ -82,6 +59,22 @@ public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPre
     return false;
   }
 
+  @Override
+  protected String getCategoryNumber() {
+    return CategoryID.CATEGORY_5;
+  }
+
+  @Override
+  protected void addItemDecoration() {
+    recyclerView.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(20);
+      }
+    });
+  }
+
   @Override
   public void hideRecommendArea() {
 
@@ -89,12 +82,15 @@ public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPre
 
   @Override
   public void drawContentsBanner(List<CategoryBannerBean> beans, List<CategoryContentsBean> contents) {
+
     FifthCategoryMainAdapter fifthCategoryMainAdapter = new FifthCategoryMainAdapter(getActivity(), beans, contents, event -> {
       presenter.onEvent(event);
     });
     LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
-    recyclerViewFifthCategoryMain.setLayoutManager(linearLayoutManager);
-    recyclerViewFifthCategoryMain.setAdapter(fifthCategoryMainAdapter);
+    recyclerView.setPadding(ResourceUtil.dpToPx(25), 0, ResourceUtil.dpToPx(25), 0);
+    recyclerView.setLayoutManager(linearLayoutManager);
+    recyclerView.setAdapter(fifthCategoryMainAdapter);
+
   }
 
   @Override

+ 14 - 9
app/src/main/res/layout/fragment_category_main_first.xml

@@ -32,25 +32,30 @@
       </kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView>
 
       <android.support.v7.widget.Toolbar
-        android:visibility="gone"
         android:id="@+id/flexible.example.toolbar"
         android:layout_width="match_parent"
         android:layout_height="35dp"
         android:layout_gravity="top"
         android:background="@null"
+        android:visibility="gone"
         app:elevation="0dp"
         app:layout_collapseMode="pin"
         tools:visibility="gone"
         />
-
-      <RelativeLayout
+      <Space
+        android:id="@+id/space"
+        android:layout_width="match_parent"
+        android:layout_height="23dp"
         android:visibility="gone"
-        android:id="@+id/relativeLayout"
+        tools:visibility="visible"/>
+      <RelativeLayout
+        android:id="@+id/relative_layout_spinner_filter"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_gravity="bottom"
         android:background="@color/CFFFFFF"
-        app:layout_collapseMode="pin">
+        app:layout_collapseMode="pin"
+        tools:visibility="visible">
 
         <Spinner
           android:id="@+id/spinner_select_contents"
@@ -62,7 +67,8 @@
           android:background="@null"
           android:focusable="true"
           android:lineSpacingExtra="4sp"
-          android:textColor="@color/C000000"/>
+          android:textColor="@color/C000000"
+          android:visibility="visible"/>
 
         <ImageView
           android:id="@+id/first_category_main_filter"
@@ -85,15 +91,14 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:descendantFocusability="blocksDescendants"
+    android:orientation="vertical"
     app:layout_behavior="@string/appbar_scrolling_view_behavior">
 
     <android.support.v7.widget.RecyclerView
-      android:id="@+id/recycler_view_first_category_main"
+      android:id="@+id/recycler_view_category_main"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_gravity="bottom"
-      android:layout_marginStart="21dp"
-      android:layout_marginEnd="21dp"
       android:clipToPadding="false"
       />
   </LinearLayout>

+ 0 - 22
app/src/main/res/layout/fragment_category_main_fifth.xml

@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<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:layout_width="match_parent"
-  android:layout_height="match_parent">
-
-  <android.support.v7.widget.RecyclerView
-    android:id="@+id/recycler_view_fifth_category_main"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:paddingStart="25dp"
-    android:paddingEnd="25dp"
-    android:clipToPadding="false"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior"
-    app:layout_constraintBottom_toBottomOf="parent"
-    app:layout_constraintLeft_toLeftOf="parent"
-    app:layout_constraintRight_toRightOf="parent"
-    />
-
-</android.support.design.widget.CoordinatorLayout>

+ 0 - 93
app/src/main/res/layout/fragment_category_main_fourth.xml

@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<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/root_layout"
-  android:layout_width="match_parent"
-  android:layout_height="match_parent">
-
-  <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="match_parent"
-      app:layout_scrollFlags="scroll|exitUntilCollapsed">
-
-
-      <kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView
-        android:id="@+id/series_image_text_view"
-        android:layout_width="match_parent"
-        android:layout_height="156dp"
-        android:layout_marginTop="23dp"
-        android:clipToPadding="false"
-        app:layout_collapseMode="pin"
-        app:layout_constraintTop_toTopOf="parent">
-      </kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView>
-
-      <android.support.v7.widget.Toolbar
-        android:id="@+id/flexible.example.toolbar"
-        android:layout_width="match_parent"
-        android:layout_height="0dp"
-        android:layout_gravity="top"
-        android:background="@null"
-        android:visibility="gone"
-        app:elevation="0dp"
-        app:layout_collapseMode="pin"
-        tools:visibility="gone"
-        />
-
-      <RelativeLayout
-        android:id="@+id/relativeLayout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="bottom"
-        android:background="@color/CFFFFFF"
-        android:visibility="gone"
-        app:layout_collapseMode="pin"
-        tools:background="@color/CD0D0D0">
-
-        <Spinner
-          android:id="@+id/spinner_select_contents"
-          android:layout_width="wrap_content"
-          android:layout_height="35dp"
-          android:layout_alignParentTop="true"
-          android:layout_alignParentBottom="true"
-          android:layout_marginStart="14dp"
-          android:background="@null"
-          android:focusable="true"
-          android:lineSpacingExtra="4sp"
-          android:textColor="@color/C000000"
-          />
-      </RelativeLayout>
-    </android.support.design.widget.CollapsingToolbarLayout>
-  </android.support.design.widget.AppBarLayout>
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:descendantFocusability="blocksDescendants"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior">
-
-
-    <android.support.v7.widget.RecyclerView
-      android:id="@+id/recycler_view_fourth_category_main"
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_gravity="bottom"
-      android:paddingStart="25dp"
-      android:paddingEnd="25dp"
-      android:clipToPadding="false"
-      app:layout_constraintBottom_toBottomOf="parent"
-      app:layout_constraintLeft_toLeftOf="parent"
-      app:layout_constraintRight_toRightOf="parent"
-      app:layout_constraintTop_toBottomOf="@id/relativeLayout"
-      />
-  </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>

+ 0 - 104
app/src/main/res/layout/fragment_category_main_second.xml

@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<android.support.design.widget.CoordinatorLayout
-  android:id="@+id/root_layout"
-  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.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="match_parent"
-      app:layout_scrollFlags="scroll|exitUntilCollapsed">
-
-
-      <kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView
-        android:id="@+id/series_image_text_view"
-        android:layout_width="match_parent"
-        android:layout_height="156dp"
-        android:layout_marginTop="23dp"
-        android:layout_marginBottom="31dp"
-        android:clipToPadding="false"
-        app:layout_collapseMode="pin"
-        app:layout_constraintTop_toTopOf="parent">
-      </kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView>
-
-      <android.support.v7.widget.Toolbar
-        android:id="@+id/flexible.example.toolbar"
-        android:layout_width="match_parent"
-        android:layout_height="35dp"
-        android:layout_gravity="top"
-        android:background="@null"
-        android:visibility="gone"
-        app:elevation="0dp"
-        app:layout_collapseMode="pin"
-        tools:visibility="gone"
-        />
-
-      <RelativeLayout
-        android:visibility="gone"
-        android:id="@+id/relativeLayout"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_gravity="bottom"
-        android:background="@color/CFFFFFF"
-        app:layout_collapseMode="pin">
-
-        <Spinner
-          android:id="@+id/spinner_select_contents"
-          android:layout_width="wrap_content"
-          android:layout_height="35dp"
-          android:layout_marginStart="14dp"
-          android:focusable="true"
-          android:textColor="@color/C000000"
-          android:background="@null"
-          android:layout_alignParentTop="true"
-          android:layout_alignParentBottom="true"
-          android:lineSpacingExtra="4sp"/>
-
-        <ImageView
-          android:id="@+id/second_category_main_filter"
-          android:layout_width="wrap_content"
-          android:layout_height="wrap_content"
-          android:layout_alignParentEnd="true"
-          android:paddingTop="5dp"
-          android:paddingBottom="5dp"
-          android:paddingStart="10dp"
-          android:paddingEnd="10dp"
-          android:layout_marginEnd="15dp"
-          android:layout_alignParentBottom="true"
-          app:srcCompat="@drawable/ic_filter_de"
-          />
-      </RelativeLayout>
-    </android.support.design.widget.CollapsingToolbarLayout>
-  </android.support.design.widget.AppBarLayout>
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior">
-
-    <android.support.v7.widget.RecyclerView
-      android:id="@+id/recycler_view_second_category_main"
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_gravity="bottom"
-      android:paddingStart="25dp"
-      android:paddingEnd="25dp"
-      android:clipToPadding="false"
-      app:layout_constraintBottom_toBottomOf="parent"
-      app:layout_constraintLeft_toLeftOf="parent"
-      app:layout_constraintRight_toRightOf="parent"
-      app:layout_constraintTop_toBottomOf="@id/relativeLayout"
-      />
-  </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>

+ 0 - 93
app/src/main/res/layout/fragment_category_main_third.xml

@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<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/root_layout"
-  android:layout_width="match_parent"
-  android:layout_height="match_parent">
-
-  <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="match_parent"
-      app:layout_scrollFlags="scroll|exitUntilCollapsed">
-
-
-      <kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView
-        android:id="@+id/series_image_text_view"
-        android:layout_width="match_parent"
-        android:layout_height="156dp"
-        android:layout_marginTop="23dp"
-        android:layout_marginBottom="31dp"
-        android:clipToPadding="false"
-        app:layout_collapseMode="pin"
-        app:layout_constraintTop_toTopOf="parent">
-      </kr.co.zumo.app.lifeplus.view.custom.category.series.MainSeriesView>
-
-      <android.support.v7.widget.Toolbar
-        android:id="@+id/flexible.example.toolbar"
-        android:layout_width="match_parent"
-        android:layout_height="35dp"
-        android:layout_gravity="top"
-        android:background="@null"
-        android:visibility="gone"
-        app:elevation="0dp"
-        app:layout_collapseMode="pin"
-        tools:visibility="gone"
-        />
-
-      <RelativeLayout
-        android:id="@+id/relativeLayout"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_gravity="bottom"
-        android:background="@color/CFFFFFF"
-        android:visibility="gone"
-        app:layout_collapseMode="pin"
-        tools:background="@color/CD0D0D0">
-
-        <Spinner
-          android:id="@+id/spinner_select_contents"
-          android:layout_width="wrap_content"
-          android:layout_height="35dp"
-          android:layout_alignParentTop="true"
-          android:layout_alignParentBottom="true"
-          android:layout_marginStart="14dp"
-          android:background="@null"
-          android:focusable="true"
-          android:lineSpacingExtra="4sp"
-          android:textColor="@color/C000000"/>
-
-      </RelativeLayout>
-    </android.support.design.widget.CollapsingToolbarLayout>
-  </android.support.design.widget.AppBarLayout>
-
-  <LinearLayout
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:descendantFocusability="blocksDescendants"
-    app:layout_behavior="@string/appbar_scrolling_view_behavior">
-
-    <android.support.v7.widget.RecyclerView
-      android:id="@+id/recycler_view_third_category_main"
-      android:layout_width="match_parent"
-      android:layout_height="wrap_content"
-      android:layout_gravity="bottom"
-      android:layout_marginStart="16dp"
-      android:layout_marginEnd="16dp"
-      android:clipToPadding="false"
-      app:layout_constraintBottom_toBottomOf="parent"
-      app:layout_constraintLeft_toLeftOf="parent"
-      app:layout_constraintRight_toRightOf="parent"
-      app:layout_constraintTop_toBottomOf="@id/relativeLayout"
-      />
-  </LinearLayout>
-</android.support.design.widget.CoordinatorLayout>