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.
Asked
Active
Viewed 228 times
0
-
1if you need to start new activity use image button why complicate things with view pager – Illegal Argument Oct 27 '13 at 13:19
-
Can i get the example codes in similar manner @Subash – Crishnan Kandada Oct 31 '13 at 09:08
1 Answers
1
I don't see why you want to use ViewPager here.
You can have a parent FrameLayout
with four View
s, for example ImageView
s. Then, you can:
- 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 theMotionEvent.ACTION_MOVE
touch event until a certain threshold and then start a newActivity
) - You can use this post: move a view on touch move as an example. - Do the same by using Gesture Detector.