Code example for ScrollView

Methods: getChildAt, getHeight, getScrollY

0
		public boolean onTouch(View v, MotionEvent event) {
			switch (event.getAction()) {
			case MotionEvent.ACTION_DOWN:
				break; 
			case MotionEvent.ACTION_UP:
				View view = mWaterFallScrollView.getChildAt(0);
				if (view != null) {
					if (view.getMeasuredHeight() - 20 <= mWaterFallScrollView.getScrollY() + mWaterFallScrollView.getHeight()) {
						new Thread() {
							public void run() { 
								loadResource(); 
							} 
						}.start();
					} 
				} 
				break; 
			default: 
				break; 
			} 
			return false; 
		}