Java Code Examples for com.nostra13.universalimageloader.core.imageaware.ImageAware#getWidth()

The following examples show how to use com.nostra13.universalimageloader.core.imageaware.ImageAware#getWidth() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImageSizeUtils.java    From candybar with Apache License 2.0 5 votes vote down vote up
/**
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
    int width = imageAware.getWidth();
    if (width <= 0) width = maxImageSize.getWidth();

    int height = imageAware.getHeight();
    if (height <= 0) height = maxImageSize.getHeight();

    return new ImageSize(width, height);
}
 
Example 2
Source File: ImageSizeUtils.java    From letv with Apache License 2.0 5 votes vote down vote up
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
    int width = imageAware.getWidth();
    if (width <= 0) {
        width = maxImageSize.getWidth();
    }
    int height = imageAware.getHeight();
    if (height <= 0) {
        height = maxImageSize.getHeight();
    }
    return new ImageSize(width, height);
}
 
Example 3
Source File: ImageSizeUtils.java    From Yahala-Messenger with MIT License 5 votes vote down vote up
/**
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
    int width = imageAware.getWidth();
    if (width <= 0) width = maxImageSize.getWidth();

    int height = imageAware.getHeight();
    if (height <= 0) height = maxImageSize.getHeight();

    return new ImageSize(width, height);
}
 
Example 4
Source File: ImageSizeUtils.java    From mobile-manager-tool with MIT License 5 votes vote down vote up
/**
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
	int width = imageAware.getWidth();
	if (width <= 0) width = maxImageSize.getWidth();

	int height = imageAware.getHeight();
	if (height <= 0) height = maxImageSize.getHeight();

	return new ImageSize(width, height);
}
 
Example 5
Source File: ImageSizeUtils.java    From BigApp_WordPress_Android with Apache License 2.0 5 votes vote down vote up
/**
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
	int width = imageAware.getWidth();
	if (width <= 0) width = maxImageSize.getWidth();

	int height = imageAware.getHeight();
	if (height <= 0) height = maxImageSize.getHeight();

	return new ImageSize(width, height);
}
 
Example 6
Source File: ImageSizeUtils.java    From WliveTV with Apache License 2.0 5 votes vote down vote up
/**
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
	int width = imageAware.getWidth();
	if (width <= 0) width = maxImageSize.getWidth();

	int height = imageAware.getHeight();
	if (height <= 0) height = maxImageSize.getHeight();

	return new ImageSize(width, height);
}
 
Example 7
Source File: ImageSizeUtils.java    From MiBandDecompiled with Apache License 2.0 5 votes vote down vote up
public static ImageSize defineTargetSizeForView(ImageAware imageaware, ImageSize imagesize)
{
    int i = imageaware.getWidth();
    if (i <= 0)
    {
        i = imagesize.getWidth();
    }
    int j = imageaware.getHeight();
    if (j <= 0)
    {
        j = imagesize.getHeight();
    }
    return new ImageSize(i, j);
}
 
Example 8
Source File: ImageSizeUtils.java    From Android-Universal-Image-Loader-Modify with Apache License 2.0 5 votes vote down vote up
/**
 * 给显示的控件定义目标大小
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
	int width = imageAware.getWidth();
	if (width <= 0) width = maxImageSize.getWidth();

	int height = imageAware.getHeight();
	if (height <= 0) height = maxImageSize.getHeight();

	return new ImageSize(width, height);
}
 
Example 9
Source File: ImageSizeUtils.java    From android-open-project-demo with Apache License 2.0 5 votes vote down vote up
/**
 * Defines target size for image aware view. Size is defined by target
 * {@link com.nostra13.universalimageloader.core.imageaware.ImageAware view} parameters, configuration
 * parameters or device display dimensions.<br />
 */
public static ImageSize defineTargetSizeForView(ImageAware imageAware, ImageSize maxImageSize) {
	int width = imageAware.getWidth();
	if (width <= 0) width = maxImageSize.getWidth();

	int height = imageAware.getHeight();
	if (height <= 0) height = maxImageSize.getHeight();

	return new ImageSize(width, height);
}