|
|
@@ -11,7 +11,6 @@ import android.support.v7.widget.LinearSmoothScroller;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
|
import android.util.DisplayMetrics;
|
|
|
import android.view.LayoutInflater;
|
|
|
-import android.view.MotionEvent;
|
|
|
import android.view.View;
|
|
|
import android.view.ViewGroup;
|
|
|
import android.widget.TextView;
|
|
|
@@ -32,7 +31,6 @@ import kr.co.zumo.app.lifeplus.view.IEventListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.IndexScrollListener;
|
|
|
import kr.co.zumo.app.lifeplus.view.custom.Tutorial;
|
|
|
import kr.co.zumo.app.lifeplus.view.screen.FragmentBase;
|
|
|
-import kr.co.zumo.app.lifeplus.view.screen.main.TouchEventWithDirection;
|
|
|
|
|
|
/**
|
|
|
* ContentsFragment
|
|
|
@@ -72,33 +70,6 @@ public class ContentsFragment extends FragmentBase<ContentsPresenter> implements
|
|
|
|
|
|
snapHelper = new CustomPagerSnapHelper();
|
|
|
snapHelper.attachToRecyclerView(recyclerViewContentsDetail);
|
|
|
-
|
|
|
- TouchEventWithDirection touchEventWithDirection = new TouchEventWithDirection(100);
|
|
|
-
|
|
|
- recyclerViewContentsDetail.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
|
|
|
- @Override
|
|
|
- public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
|
|
|
- if (null != layoutManager && layoutManager.findFirstVisibleItemPosition() == adapter.getItemCount() - 1) {
|
|
|
- if (TouchEventWithDirection.DIRECTION_LEFT.equals(direction) && motionEvent.getAction() == MotionEvent.ACTION_UP) {
|
|
|
- presenter.onEvent(new Event.Builder(Event.LAST).build());
|
|
|
- direction = null;
|
|
|
- }
|
|
|
- else {
|
|
|
- direction = touchEventWithDirection.getDirection(motionEvent);
|
|
|
- }
|
|
|
- }
|
|
|
- return false;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onTouchEvent(RecyclerView rv, MotionEvent motionEvent) {
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public void onRequestDisallowInterceptTouchEvent(boolean disallowIntercept) {
|
|
|
-
|
|
|
- }
|
|
|
- });
|
|
|
}
|
|
|
|
|
|
@Override
|