Code example for Reference

Methods: get

0
	 * 2) Get <b>layout_width</b>. If it hasn't exact value then go to step #3.<br /> 
	 * 3) Get <b>maxWidth</b>. 
	 */ 
	@Override 
	public int getWidth() { 
		ImageView imageView = imageViewRef.get();
		if (imageView != null) {
			final ViewGroup.LayoutParams params = imageView.getLayoutParams();
			int width = 0;
			if (checkActualViewSize && params != null && params.width != ViewGroup.LayoutParams.WRAP_CONTENT) {
				width = imageView.getWidth(); // Get actual image width
			} 
			if (width <= 0 && params != null) width = params.width; // Get layout width parameter
			if (width <= 0) width = getImageViewFieldValue(imageView, "mMaxWidth"); // Check maxWidth parameter
			return width;
		} 
		return 0; 
	} 
 
	/** 
	 * {@inheritDoc}