Imagine you want to create interactive horizontal slide gallery with paging (scroll left/right not one-by-one but pages).
Like this one:

Hopefully you can easily implement this with HorizontalScrollView. Since API level 3 it has method smoothScrollBy.

Your code may looks like:

public class TestUIActivity extends Activity {

	private GestureDetector gestureDetector = null;
	private HorizontalScrollView hs;

	private int mWidth = 1160;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		gestureDetector = new GestureDetector(new MyGestureDetector());
		hs = (HorizontalScrollView) findViewById(R.id.hs);
		hs.setOnTouchListener(new OnTouchListener() {

			@Override
			public boolean onTouch(View v, MotionEvent event) {
				if (gestureDetector.onTouchEvent(event)) {
					return true;
				}
				if (event.getAction() == 1) {
					if (hs.getScrollX() > mWidth + mWidth / 2) {
						hs.smoothScrollBy(mWidth * 2 - hs.getScrollX(), 0);
					} else if (hs.getScrollX() > mWidth / 2) {
						hs.smoothScrollBy(mWidth - hs.getScrollX(), 0);
					} else {
						hs.smoothScrollBy(-hs.getScrollX(), 0);
					}
					return true;
				}
				return false;
			}
		});
	}

	class MyGestureDetector extends SimpleOnGestureListener {

		@Override
		public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
				float velocityY) {
			if (e1.getX() < e2.getX()) {
				moveLeft();
			} else {
				moveRight();
			}
			return true;
		}
	}

	private void moveRight() {
		if (hs.getScrollX() > 0 && hs.getScrollX() < mWidth) {
			hs.smoothScrollBy(mWidth - hs.getScrollX(), 0);
		} else if (hs.getScrollX() > mWidth && hs.getScrollX() < mWidth * 2) {
			hs.smoothScrollBy(mWidth * 2 - hs.getScrollX(), 0);
		}

	}

	private void moveLeft() {
		if (hs.getScrollX() > 0 && hs.getScrollX() < mWidth) {
			hs.smoothScrollBy(-hs.getScrollX(), 0);
		} else if (hs.getScrollX() > mWidth && hs.getScrollX() < mWidth * 2) {
			hs.smoothScrollBy(mWidth - hs.getScrollX(), 0);
		}

	}
}

and simple layout that you may construct from code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:orientation="vertical"
	android:layout_width="fill_parent"
	android:layout_height="fill_parent">
	<com.dlukashev.test.HorizontalScrollView
		android:id="@+id/hs"
		android:scrollbars="none"
		android:layout_width="1160dp"
		android:layout_height="wrap_content">
		<LinearLayout
			android:layout_width="wrap_content"
			android:layout_height="fill_parent">
			<!-- page1 -->
			<TextView
				android:id="@+id/id1"
				android:background="#FFFFFF"
				android:layout_marginLeft="10dp"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFFFF"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFFFF"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFFFF"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFFFF"
				android:layout_marginRight="20dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<!-- page2 -->
			<TextView
				android:background="#FF0000"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FF0000"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FF0000"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FF0000"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FF0000"
				android:layout_marginRight="20dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<!-- page3 -->
			<TextView
				android:background="#FFFF00"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFF00"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFF00"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFF00"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
			<TextView
				android:background="#FFFF00"
				android:layout_marginRight="10dp"
				android:layout_width="220dp"
				android:layout_height="220dp" />
		</LinearLayout>
	</com.dlukashev.test.HorizontalScrollView>
</LinearLayout>

One sad detail that you cannot change view animation speed (DEFAULT_DURATION=250 in class OverScroller). But you can easily fix it by adding HorizontalScrollView, OverScroller, Scroller and EdgeGlow to your project.

You can find full sample with animation speed = 500 here. This sample is for tablet resolution – change layout and items sizes for the phone if you would like.

//DL