Code example for TypedArray

Methods: getLayoutDimension, hasValue

0
		 * @see android.view.ViewGroup.LayoutParams#setBaseAttributes(android.content.res.TypedArray, int, int) 
		 */ 
		@Override 
		protected void setBaseAttributes( TypedArray a, int widthAttr, int heightAttr ) {
 
			if ( a.hasValue( widthAttr ) ) {
				width = a.getLayoutDimension( widthAttr, "layout_width" );
			} else { 
				width = MATCH_PARENT;
			} 
 
			if ( a.hasValue( heightAttr ) ) {
				height = a.getLayoutDimension( heightAttr, "layout_height" );
			} else { 
				height = MATCH_PARENT;
			} 
		} 
	} 
 
	/** 
	 * The listener interface for receiving onCheckedChange events. The class that is interested in processing a onCheckedChange