Code example for View

Methods: getLayoutParamsgetMeasuredHeight

0
	int getHeaderHeight() { 
		if (header == null) {
			return 0; 
		} 
		MarginLayoutParams params = (MarginLayoutParams) header
				.getLayoutParams();
		int width = getMeasuredWidth()
				- (params == null ? 0
						: (params.leftMargin + params.rightMargin));
		int parentWidthMeasureSpec = MeasureSpec.makeMeasureSpec(width,
				MeasureSpec.EXACTLY);
		int parentHeightMeasureSpec = MeasureSpec.makeMeasureSpec(getHeight(),
				MeasureSpec.EXACTLY);
		measureChild(header, parentWidthMeasureSpec, parentHeightMeasureSpec);
		return header.getMeasuredHeight();
	} 
 
	@SuppressLint("NewApi") 
	void setHeaderBottomPosition(int headerBottomPosition) {
		if (header != null) {
Stop searching for code, let great code find you!  Add Codota to your java IDE