use of com.facebook.drawee.view.SimpleDraweeView in project SherlockAdapter by EvilBT.
the class Card method convert.
@Override
public void convert(BaseViewHolder holder) {
holder.setText(R.id.tv_image_title, mData.mImageTitle);
SimpleDraweeView sdv = holder.find(R.id.iv_bg);
if (mImageViewSize == null || mImageViewSize.x <= 0 || mImageViewSize.y <= 0) {
mImageViewSize = new Point();
FrescoUtil.setWrapAndResizeImage(sdv, mData.mImageResId, mWidth, mImageViewSize);
Log.d("Image", "第一次,需要重绘");
} else {
FrescoUtil.resizeImage(sdv, mData.mImageResId, mImageViewSize.x, mImageViewSize.y);
Log.d("Image", "不是第一次,不需要重绘:" + mImageViewSize.toString());
Log.d("Image", "不是第一次:" + sdv.getAspectRatio() + "," + mData.mImageResId);
}
}
use of com.facebook.drawee.view.SimpleDraweeView in project SherlockAdapter by EvilBT.
the class Image method convert.
@Override
public void convert(BaseViewHolder holder) {
SimpleDraweeView sdv = holder.find(R.id.image);
if (mImageViewSize == null || mImageViewSize.x <= 0 || mImageViewSize.y <= 0) {
mImageViewSize = new Point();
FrescoUtil.setWrapAndResizeImage(sdv, mImageId, mImageWidth, mImageViewSize);
Log.d("Image", "第一次,需要重绘");
} else {
FrescoUtil.resizeImage(sdv, mImageId, mImageViewSize.x, mImageViewSize.y);
Log.d("Image", "不是第一次,不需要重绘:" + mImageViewSize.toString());
Log.d("Image", "不是第一次:" + sdv.getAspectRatio() + "," + mImageId);
}
}
use of com.facebook.drawee.view.SimpleDraweeView in project apps-android-wikipedia by wikimedia.
the class ReadingListItemView method clearThumbnails.
private void clearThumbnails() {
for (SimpleDraweeView view : imageViews) {
ViewUtil.loadImageUrlInto(view, null);
view.getHierarchy().setFailureImage(null);
}
}
use of com.facebook.drawee.view.SimpleDraweeView in project fresco by facebook.
the class MediaVariationsFragment method populateMainImage.
private void populateMainImage(View rootView) {
mMainImageDraweeView = (SimpleDraweeView) rootView.findViewById(R.id.img_main);
loadMainImage();
mMainImageDraweeView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loadMainImage();
}
});
ResizableFrameLayout mainImageFrameLayout = (ResizableFrameLayout) rootView.findViewById(R.id.frame_main);
mainImageFrameLayout.init(rootView.findViewById(R.id.btn_resize));
}
use of com.facebook.drawee.view.SimpleDraweeView in project fresco by facebook.
the class MediaVariationsFragment method populateThumb.
private void populateThumb(View rootView, @IdRes int viewId, final Size size) {
final SimpleDraweeView draweeView = (SimpleDraweeView) rootView.findViewById(viewId);
loadThumb(draweeView, size, ImageRequest.RequestLevel.DISK_CACHE);
draweeView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
loadThumb(draweeView, size, ImageRequest.RequestLevel.FULL_FETCH);
}
});
}
Aggregations