|
|
@@ -11,11 +11,12 @@ import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import kr.co.zumo.app.R;
|
|
|
+import kr.co.zumo.app.lifeplus.bean.api.SeriesItemBean;
|
|
|
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.IEventListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
|
|
|
/**
|
|
|
@@ -33,6 +34,7 @@ public class ContentsSeriesFragment extends FragmentBase<ContentsSeriesPresenter
|
|
|
private RecyclerView recyclerViewCategoryMainSeries;
|
|
|
private TextView textViewTitle;
|
|
|
private TextView textViewSubTitle;
|
|
|
+ private ContentsSeriesAdapter adapter;
|
|
|
|
|
|
@Override
|
|
|
protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
@@ -46,14 +48,6 @@ public class ContentsSeriesFragment extends FragmentBase<ContentsSeriesPresenter
|
|
|
textViewTitle = findViewById(R.id.text_view_title);
|
|
|
|
|
|
recyclerViewCategoryMainSeries = findViewById(R.id.recycler_view_series);
|
|
|
- ContentsSeriesAdapter adapter = new ContentsSeriesAdapter(getActivity(), new IEventListener() {
|
|
|
- @Override
|
|
|
- public void onEvent(Event event) {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
- recyclerViewCategoryMainSeries.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
|
|
recyclerViewCategoryMainSeries.addItemDecoration(new RecyclerView.ItemDecoration() {
|
|
|
@Override
|
|
|
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
|
|
|
@@ -61,7 +55,7 @@ public class ContentsSeriesFragment extends FragmentBase<ContentsSeriesPresenter
|
|
|
outRect.bottom = ResourceUtil.dpToPx(10);
|
|
|
}
|
|
|
});
|
|
|
- recyclerViewCategoryMainSeries.setAdapter(adapter);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -102,4 +96,40 @@ public class ContentsSeriesFragment extends FragmentBase<ContentsSeriesPresenter
|
|
|
public void setSeriesSubTitle(String subTitle) {
|
|
|
textViewSubTitle.setText(subTitle);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void draw(List<SeriesItemBean> list) {
|
|
|
+
|
|
|
+ adapter = new ContentsSeriesAdapter(getActivity(), list, event -> {
|
|
|
+ presenter.onEvent(event);
|
|
|
+ });
|
|
|
+
|
|
|
+ recyclerViewCategoryMainSeries.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
|
|
|
+ recyclerViewCategoryMainSeries.setAdapter(adapter);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void goGooglePlay() {
|
|
|
+ // nothing
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void render(String url) {
|
|
|
+ // nothing
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void setTooltip() {
|
|
|
+ // nothing
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void setLiked(boolean isChecked) {
|
|
|
+ adapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void setBookmarked(boolean isChecked) {
|
|
|
+ adapter.notifyDataSetChanged();
|
|
|
+ }
|
|
|
}
|