Code example for RelativeLayout

Methods: getLayoutParams, setLayoutParams

0
	} 
 
	private void setHeaderPadding(int padding){
		headerPadding = padding;
 
		MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) header.getLayoutParams();
		mlp.setMargins(0, Math.round(padding), 0, 0);
		header.setLayoutParams(mlp);
	} 
	 
	private boolean isPulling = false;
	private boolean isPull(MotionEvent event){
		return isPulling;
	} 
	 
	@Override 
	public boolean onInterceptTouchEvent(MotionEvent event) {
		if(lockScrollWhileRefreshing
				&& (state == State.REFRESHING || getAnimation() != null && !getAnimation().hasEnded())){
			return true;	//consume touch event here.. 
		}