Code example for RelativeLayout

Methods: getPaddingBottom, getPaddingLeft, getPaddingRight, setPadding

0
 
	/** 
	 * Sets the header padding back to original size. 
	 */ 
	private void resetHeaderPadding() { 
		mRefreshTopView.setPadding(mRefreshTopView.getPaddingLeft(),
				mRefreshOriginalTopPadding, mRefreshTopView.getPaddingRight(),
				mRefreshTopView.getPaddingBottom());
	} 
 
	/** 
	 * Resets the header to the original state. 
	 */ 
	private void resetHeader() { 
		if (mRefreshHeaderState != TAP_TO_REFRESH) {
			mRefreshHeaderState = TAP_TO_REFRESH;
 
			resetHeaderPadding(); 
 
			// Set refresh view text to the pull label 
			mRefreshTopViewText.setText(R.string.push_to_refresh_tap_label);