Code example for View

Methods: findViewById, getMeasuredHeight, getPaddingTop, setOnClickListener

0
		mReverseFlipAnimation.setDuration(250);
		mReverseFlipAnimation.setFillAfter(true);
 
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		mRefreshViewLayout = (RelativeLayout) inflater.inflate(R.layout.drop_down_to_refresh_list_header, this, false);
		mRefreshViewTipsText = (TextView) mRefreshViewLayout.findViewById(R.id.drop_down_to_refresh_list_text);
		mRefreshViewImage = (ImageView) mRefreshViewLayout.findViewById(R.id.drop_down_to_refresh_list_image);
		mRefreshViewProgress = (ProgressBar) mRefreshViewLayout.findViewById(R.id.drop_down_to_refresh_list_progress);
		mRefreshViewLastUpdatedText = (TextView) mRefreshViewLayout.findViewById(R.id.drop_down_to_refresh_list_last_updated_text);
		mRefreshViewImage.setMinimumHeight(50);
		mRefreshViewLayout.setOnClickListener(new OnClickRefreshListener());
		mRefreshViewTipsText.setText(R.string.drop_down_to_refresh_list_refresh_view_tips);
		 
		addHeaderView(mRefreshViewLayout);
		 
	 
		super.setOnScrollListener(this);
 
		measureView(mRefreshViewLayout);
		mHeaderOriginalHeight = mRefreshViewLayout.getMeasuredHeight();
		mHeaderOriginalTopPadding = mRefreshViewLayout.getPaddingTop();
		mCurrentRefreshState = RefreshStatusEnum.RELEASE_TO_REFRESH;
		//onRefreshBegin(); 
		 
	//	mOnRefreshListener.onRefresh();