|
|
@@ -10,15 +10,11 @@ import java.util.List;
|
|
|
import kr.co.zumo.app.R;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.CategoryBannerBean;
|
|
|
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.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.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.GridItemDecoration;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.category.ICategoryMainView;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.category.type1.FirstCategoryMainAdapter;
|
|
|
@@ -36,9 +32,6 @@ import kr.co.zumo.app.lifeplus.view.screen.category.type1.FirstCategoryMainAdapt
|
|
|
*/
|
|
|
public class SecondCategoryMainFragment extends CategoryMainFragment<SecondCategoryMainPresenter> implements ICategoryMainView {
|
|
|
|
|
|
- private IMainSeriesContract.Presenter seriesPresenter;
|
|
|
- private SecondCategoryMainAdapter adapter;
|
|
|
-
|
|
|
@Override
|
|
|
protected void defineActionBarInternal(ActionBarHelper actionBarHelper) {
|
|
|
actionBarHelper.begin().title(R.string.contents_category2_action_bar_title)
|
|
|
@@ -129,26 +122,4 @@ public class SecondCategoryMainFragment extends CategoryMainFragment<SecondCateg
|
|
|
recyclerView.setAdapter(adapter);
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- @Override
|
|
|
- public void drawRecommend(List<CategoryRecommendBean> beans) {
|
|
|
- mainSeriesView.init(getActivity(), beans);
|
|
|
- seriesPresenter = new MainSeriesPresenter(mainSeriesView, index -> {
|
|
|
- presenter.onEvent(new Event.Builder(Event.RECOMMEND).index(index).build());
|
|
|
- });
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void updateContents(List<CategoryContentsBean> contentsBeans, boolean isBannerVisible) {
|
|
|
- adapter.update(contentsBeans, isBannerVisible);
|
|
|
- recyclerView.scrollToPosition(0);
|
|
|
-
|
|
|
- CategorySortScroller scroller = new CategorySortScroller(layoutRoot, appBarLayout);
|
|
|
- scroller.doAppBarLayoutInitialization();
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void appendContents(List<CategoryContentsBean> contentsBeans, int appendIndex) {
|
|
|
- adapter.append(contentsBeans, appendIndex);
|
|
|
- }
|
|
|
}
|