Code example for View

Methods: getLayoutParamsmeasure

0
	 *           the child 
	 * @param viewPos 
	 *           the view pos 
	 */ 
	private void addAndMeasureChild( final View child, int viewPos ) {
		LayoutParams params = child.getLayoutParams();
 
		if ( params == null ) {
			params = new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT );
		} 
 
		addViewInLayout( child, viewPos, params );
		forceChildLayout( child, params );
	} 
 
	public void forceChildLayout( final View child, final LayoutParams params ) {
		int childHeightSpec = ViewGroup.getChildMeasureSpec( mHeightMeasureSpec, getPaddingTop() + getPaddingBottom(), params.height );
		int childWidthSpec = ViewGroup.getChildMeasureSpec( mWidthMeasureSpec, getPaddingLeft() + getPaddingRight(), params.width );
		child.measure( childWidthSpec, childHeightSpec );
	} 
 
	/** 
	 * Gets the real height. 
	 *  
Experience pair programming with AI  Get Codota for Java