本文整理汇总了Java中com.nostra13.universalimageloader.core.imageaware.ImageAware.getWidth方法的典型用法代码示例。如果您正苦于以下问题:Java ImageAware.getWidth方法的具体用法?Java ImageAware.getWidth怎么用?Java ImageAware.getWidth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.nostra13.universalimageloader.core.imageaware.ImageAware
的用法示例。
在下文中一共展示了ImageAware.getWidth方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: defineTargetSizeForView
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
/**
* 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);
}
示例2: defineTargetSizeForView
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
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);
}
示例3: defineTargetSizeForView
import com.nostra13.universalimageloader.core.imageaware.ImageAware; //导入方法依赖的package包/类
/**
* Defines target size for image aware view. Size is defined by target
* {@link 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);
}