Ok I have a ViewFlipper
with three LinearLayouts
nested inside it. It defaults to showing the first one. This code:
// Assumptions in m
Moving the view while you're moving your finger is easily done:
case MotionEvent.ACTION_MOVE:
final View currentView = vf.getCurrentView();
currentView.layout((int)(touchEvent.getX() - oldTouchValue),
currentView.getTop(), currentView.getRight(),
currentView.getBottom());
break;
Now this only moves the current view, not the neighbors. I didn't test that yet, but those can probably be obtained by getChildAt:
vf.getChildAt(vf.getDisplayedChild() - 1); // previous
vf.getChildAt(vf.getDisplayedChild() + 1); // next
Hope that helps.
If I understand your request, this effect should now be implemented using a View Pager
Looks like this: