Search in sources :

Example 26 with SimpleDraweeView

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);
    }
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) Point(android.graphics.Point)

Example 27 with SimpleDraweeView

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);
    }
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) Point(android.graphics.Point)

Example 28 with SimpleDraweeView

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);
    }
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView)

Example 29 with SimpleDraweeView

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));
}
Also used : ResizableFrameLayout(com.facebook.fresco.samples.showcase.imagepipeline.widget.ResizableFrameLayout) SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) View(android.view.View)

Example 30 with SimpleDraweeView

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);
        }
    });
}
Also used : SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) SimpleDraweeView(com.facebook.drawee.view.SimpleDraweeView) View(android.view.View)

Aggregations

SimpleDraweeView (com.facebook.drawee.view.SimpleDraweeView)58 View (android.view.View)30 TextView (android.widget.TextView)20 Uri (android.net.Uri)8 DraweeController (com.facebook.drawee.interfaces.DraweeController)8 Intent (android.content.Intent)6 ImageView (android.widget.ImageView)5 RecyclerView (android.support.v7.widget.RecyclerView)4 Button (android.widget.Button)4 TintImageView (com.bilibili.magicasakura.widgets.TintImageView)4 RoundingParams (com.facebook.drawee.generic.RoundingParams)4 Animatable (android.graphics.drawable.Animatable)3 ViewGroup (android.view.ViewGroup)3 AdapterView (android.widget.AdapterView)3 CompoundButton (android.widget.CompoundButton)3 LinearLayout (android.widget.LinearLayout)3 SwitchCompat (androidx.appcompat.widget.SwitchCompat)3 BaseControllerListener (com.facebook.drawee.controller.BaseControllerListener)3 ControllerListener (com.facebook.drawee.controller.ControllerListener)3 ProgressBarDrawable (com.facebook.drawee.drawable.ProgressBarDrawable)3