Code example for Scroller

0
	} 
 
	public ScrollLayout(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
 
		mScroller = new Scroller(context);
 
		mCurScreen = mDefaultScreen;
		mTouchSlop = ViewConfiguration.get(getContext()).getScaledTouchSlop() * 4;
//		Log.e("mTouchSlop", String.valueOf(mTouchSlop)); 
	} 
 
	@Override 
	protected void onLayout(boolean changed, int l, int t, int r, int b) {
 
		int childLeft = 0;
		final int childCount = getChildCount();
 
		for (int i = 0; i < childCount; i++) {
			final View childView = getChildAt(i);
			if (childView.getVisibility() != View.GONE) {