Code example for RelativeLayout

Methods: startAnimation

0
	public boolean onTouchEvent(final MotionEvent ev) {
		switch (ev.getAction()) {
		case MotionEvent.ACTION_UP:
			if (currentState != State.UPDATING) {
				if (currentState == State.RELEASE) {
					header.startAnimation(new ResizeHeaderAnimation(headerHeight));
					startRefreshing(); 
				} else { 
					header.startAnimation(new ResizeHeaderAnimation(0));
				} 
			} else { 
				header.startAnimation(new ResizeHeaderAnimation(headerHeight));
			} 
		} 
		return super.onTouchEvent(ev);
	} 
 
	/** 
	 * Used to show header when scrolling down. 
	 *  
	 * @see android.view.ViewGroup#dispatchTouchEvent(android.view.MotionEvent)