|
|
@@ -50,6 +50,7 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
|
|
|
private LinearLayoutManager layoutManager;
|
|
|
private View dim;
|
|
|
private TextView textViewPageNumber;
|
|
|
+ private String direction = null;
|
|
|
|
|
|
private RecyclerView.OnScrollListener scrollEventListener;
|
|
|
|
|
|
@@ -73,11 +74,13 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
|
|
|
@Override
|
|
|
public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
|
|
|
if (null != layoutManager && layoutManager.findFirstVisibleItemPosition() == adapter.getItemCount() - 1) {
|
|
|
- if (touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_NONE)) {
|
|
|
- presenter.onEvent(new Event.Builder(Event.CANCEL).build());
|
|
|
+ if (touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_LEFT)) {
|
|
|
+ direction = TouchEventWithDirection.DIRECTION_LEFT;
|
|
|
}
|
|
|
- else if (touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_LEFT)) {
|
|
|
+ else if (null != direction && direction.equals(TouchEventWithDirection.DIRECTION_LEFT)
|
|
|
+ && touchEventWithDirection.getDirection(motionEvent).equals(TouchEventWithDirection.DIRECTION_NONE)) {
|
|
|
presenter.onEvent(new Event.Builder(Event.LAST).build());
|
|
|
+ direction = null;
|
|
|
}
|
|
|
|
|
|
}
|