Code example for RelativeLayout

Methods: getMeasuredHeight, getPaddingTop, setOnClickListener

0
				.findViewById(R.id.pull_to_refresh_progress);
		mRefreshViewLastUpdated = (TextView) mRefreshView
				.findViewById(R.id.pull_to_refresh_updated_at);
 
		mRefreshViewImage.setMinimumHeight(50);
		mRefreshView.setOnClickListener(new OnClickRefreshListener());
		mRefreshOriginalTopPadding = mRefreshView.getPaddingTop();
 
		mRefreshState = TAP_TO_REFRESH;
 
		// 为ListView头部添加view 
		addHeaderView(mRefreshView);
 
		super.setOnScrollListener(this);
 
		measureView(mRefreshView);
 
		mRefreshViewHeight = mRefreshView.getMeasuredHeight();
	} 
 
	@Override 
	protected void onAttachedToWindow() { 
		setSelection(1);
Contextual code suggestions in your IDE  Get Codota for Java