|
|
@@ -45,6 +45,13 @@ public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPre
|
|
|
@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);
|
|
|
+ }
|
|
|
+ });
|
|
|
textDate = findViewById(R.id.text_view_main_fifth_category_week);
|
|
|
}
|
|
|
|
|
|
@@ -86,19 +93,11 @@ public class FifthCategoryMainFragment extends FragmentBase<FifthCategoryMainPre
|
|
|
|
|
|
@Override
|
|
|
public void drawContentsBanner(ArrayList<CategoryBannerBean> beans, ArrayList<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.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);
|
|
|
}
|
|
|
|