0

here is the example screen i'm looking for, Is that possible with View-Pager. When i slide to that particular direction need to move another activity.

enter image description here

Crishnan Kandada
  • 651
  • 2
  • 9
  • 24

1 Answers1

1

I don't see why you want to use ViewPager here.

You can have a parent FrameLayout with four Views, for example ImageViews. Then, you can:

  1. Override the onTouchEvent() in the parent FrameLayout and detect which image was touched and act accordingly (to get an effect you may want to move your image together with the MotionEvent.ACTION_MOVE touch event until a certain threshold and then start a new Activity) - You can use this post: move a view on touch move as an example.
  2. Do the same by using Gesture Detector.
Community
  • 1
  • 1
Daniel L.
  • 5,060
  • 10
  • 36
  • 59