|
|
@@ -0,0 +1,83 @@
|
|
|
+package kr.co.zumo.app.lifeplus.view.screen.contents;
|
|
|
+
|
|
|
+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 kr.co.zumo.app.R;
|
|
|
+import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
+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;
|
|
|
+
|
|
|
+/**
|
|
|
+ * ContentsDetailFragment
|
|
|
+ * <pre>
|
|
|
+ * </pre>
|
|
|
+ *
|
|
|
+ * @author 하세미
|
|
|
+ * @version 1.0
|
|
|
+ * @history 하세미 [2018-11-27] [최초 작성]
|
|
|
+ * @since 2018-11-27
|
|
|
+ */
|
|
|
+public class ContentsDetailFragment extends FragmentBase<ContentsDetailPresenter> implements IContentsDetailView {
|
|
|
+
|
|
|
+ private RecyclerView recyclerViewContentsDetail;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected View onAfterCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
+ return inflater.inflate(R.layout.fragment_contents_detail, container, false);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onAfterActivityCreated(Bundle savedInstanceState) {
|
|
|
+ recyclerViewContentsDetail = findViewById(R.id.recycler_view_contents_detail);
|
|
|
+ ContentsDetailAdapter adapter = new ContentsDetailAdapter(getActivity(), new IEventListener() {
|
|
|
+ @Override
|
|
|
+ public void onEvent(Event event) {
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ recyclerViewContentsDetail.setLayoutManager(new LinearLayoutManager(getActivity(), LinearLayoutManager.HORIZONTAL, false));
|
|
|
+ recyclerViewContentsDetail.setAdapter(adapter);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void defineActionBar(ActionBarHelper actionBarHelper) {
|
|
|
+ actionBarHelper.begin()
|
|
|
+ .back(actionBar -> presenter.onNavigationClickBack(actionBar))
|
|
|
+ .home(actionBar -> presenter.onNavigationClickHome(actionBar))
|
|
|
+ .bookmark(actionBar -> presenter.onNavigationClickBookmark(actionBar))
|
|
|
+ .like(actionBar -> presenter.onNavigationClickLike(actionBar))
|
|
|
+ .share(actionBar -> presenter.onNavigationClickShare(actionBar))
|
|
|
+ .white()
|
|
|
+ .transparent()
|
|
|
+ .show();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected ContentsDetailPresenter definePresenter() {
|
|
|
+
|
|
|
+ return new ContentsDetailPresenter(getModel(ContentsDetailModel.class), this);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onAfterDestroyView() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected void onAfterDestroy() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected boolean isSkipScreenWhenBack() {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+}
|