|
|
@@ -1,8 +1,11 @@
|
|
|
package kr.co.zumo.app.lifeplus.view.fragment.main.category;
|
|
|
|
|
|
+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;
|
|
|
@@ -10,6 +13,7 @@ import android.view.ViewGroup;
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.manager.ActionBarManager;
|
|
|
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.main.category.FifthCategoryMainPresenter;
|
|
|
|
|
|
@@ -24,6 +28,9 @@ import kr.co.zumo.app.lifeplus.view.presenter.main.category.FifthCategoryMainPre
|
|
|
* @since 2018-10-24
|
|
|
*/
|
|
|
public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPresenter> {
|
|
|
+
|
|
|
+ private RecyclerView recyclerViewFifthCategoryMain;
|
|
|
+
|
|
|
@Override
|
|
|
protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
return inflater.inflate(R.layout.fragment_fifth_category_main, container, false);
|
|
|
@@ -31,7 +38,18 @@ public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPre
|
|
|
|
|
|
@Override
|
|
|
protected void onAfterActivityCreated(Bundle savedInstanceState) {
|
|
|
-
|
|
|
+ recyclerViewFifthCategoryMain = findViewById(R.id.recycler_view_fifth_category_main);
|
|
|
+ FifthCategoryMainAdapter fifthCategoryMainAdapter = new FifthCategoryMainAdapter(getActivity());
|
|
|
+ LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false);
|
|
|
+ recyclerViewFifthCategoryMain.setLayoutManager(linearLayoutManager );
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ recyclerViewFifthCategoryMain.setAdapter(fifthCategoryMainAdapter);
|
|
|
}
|
|
|
|
|
|
@Override
|