|
|
@@ -72,10 +72,14 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
|
|
|
recyclerViewContentsDetail.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
|
|
|
@Override
|
|
|
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
|
|
|
- if (touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_RIGHT)) {
|
|
|
- if (layoutManager.findFirstVisibleItemPosition() == adapter.getItemCount() - 1) {
|
|
|
+ if (layoutManager.findFirstVisibleItemPosition() == adapter.getItemCount() - 1) {
|
|
|
+ if (touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_NONE)) {
|
|
|
+ presenter.onEvent(new Event.Builder(Event.CANCEL).build());
|
|
|
+ }
|
|
|
+ else if (touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_LEFT)) {
|
|
|
presenter.onEvent(new Event.Builder(Event.LAST).build());
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
return false;
|
|
|
}
|