|
|
@@ -13,6 +13,7 @@ import android.support.v7.widget.RecyclerView;
|
|
|
import android.support.v7.widget.SnapHelper;
|
|
|
import android.util.DisplayMetrics;
|
|
|
import android.view.LayoutInflater;
|
|
|
+import android.view.MotionEvent;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
|
|
|
@@ -24,6 +25,7 @@ import kr.co.zumo.app.lifeplus.bean.api.ContentsDetailListBean;
|
|
|
import kr.co.zumo.app.lifeplus.bean.api.SeriesItemBean;
|
|
|
import kr.co.zumo.app.lifeplus.helper.ActionBarHelper;
|
|
|
import kr.co.zumo.app.lifeplus.util.AppUtil;
|
|
|
+import kr.co.zumo.app.lifeplus.view.Event;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
|
|
|
/**
|
|
|
@@ -195,8 +197,28 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
|
|
|
startSmoothScroll(linearSmoothScroller);
|
|
|
}
|
|
|
};
|
|
|
- recyclerViewContentsDetail.setLayoutManager(layoutManager);
|
|
|
+ recyclerViewContentsDetail.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
|
|
|
+ @Override
|
|
|
+ public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
|
|
|
+ if (motionEvent.getAction() == MotionEvent.ACTION_MOVE) {
|
|
|
+ if (layoutManager.findFirstVisibleItemPosition() == contentsDetailBeans.size() - 1) {
|
|
|
+ presenter.onEvent(new Event.Builder(Event.NONE).build());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ recyclerViewContentsDetail.setLayoutManager(layoutManager);
|
|
|
recyclerViewContentsDetail.setAdapter(adapter);
|
|
|
}
|
|
|
|