com.squareup.picasso.Picasso.load()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中com.squareup.picasso.Picasso.load()方法的一些代码示例,展示了Picasso.load()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Picasso.load()方法的具体详情如下:
包路径:com.squareup.picasso.Picasso
类名称:Picasso
方法名:load

Picasso.load介绍

暂无

代码示例

代码示例来源:origin: chrisbanes/PhotoView

@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_simple);

    final PhotoView photoView = findViewById(R.id.iv_photo);

    Picasso.with(this)
        .load("http://pbs.twimg.com/media/Bist9mvIYAAeAyQ.jpg")
        .into(photoView);
  }
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
public Object instantiateItem(ViewGroup container, int position) {
 ImageView page=new ImageView(ctxt);
 ViewGroup.LayoutParams p=
  new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
   ViewGroup.LayoutParams.MATCH_PARENT);
 container.addView(page, p);
 Picasso.with(ctxt).load(getSlideImageUri(position)).into(page);
 return(page);
}

代码示例来源:origin: commonsguy/cw-omnibus

void bindModel(Video video) {
  title.setText(video.title);

  videoUri=video.videoUri;
  videoMimeType=video.mimeType;

  Picasso.with(thumbnail.getContext())
   .load(videoUri.toString())
   .fit().centerCrop()
   .placeholder(R.drawable.ic_media_video_poster)
   .into(thumbnail);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

void showLargeThumbnail(Uri videoUri) {
 Picasso.with(thumbnailLarge.getContext())
  .load(videoUri.toString())
  .fit().centerCrop()
  .placeholder(R.drawable.ic_media_video_poster)
  .into(thumbnailLarge);
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showLargeThumbnail(Uri videoUri) {
 Picasso.with(thumbnailLarge.getContext())
  .load(videoUri.toString())
  .fit().centerCrop()
  .placeholder(R.drawable.ic_media_video_poster)
  .into(thumbnailLarge);
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showLargeThumbnail(Uri videoUri) {
 Picasso.with(thumbnailLarge.getContext())
  .load(videoUri.toString())
  .fit().centerCrop()
  .placeholder(R.drawable.ic_media_video_poster)
  .into(thumbnailLarge);
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showLargeThumbnail(Uri videoUri) {
 Picasso.with(thumbnailLarge.getContext())
  .load(videoUri.toString())
  .fit().centerCrop()
  .placeholder(R.drawable.ic_media_video_poster)
  .into(thumbnailLarge);
}

代码示例来源:origin: zhihu/Matisse

@Override
public void loadImage(Context context, int resizeX, int resizeY, ImageView imageView, Uri uri) {
  Picasso.with(context).load(uri).resize(resizeX, resizeY).priority(Picasso.Priority.HIGH)
      .centerInside().into(imageView);
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showLargeThumbnail(Uri videoUri) {
 Picasso.with(thumbnailLarge.getContext())
  .load(videoUri.toString())
  .fit().centerCrop()
  .placeholder(R.drawable.ic_media_video_poster)
  .into(thumbnailLarge);
}

代码示例来源:origin: zhihu/Matisse

@Override
public void loadThumbnail(Context context, int resize, Drawable placeholder, ImageView imageView, Uri uri) {
  Picasso.with(context).load(uri).placeholder(placeholder)
      .resize(resize, resize)
      .centerCrop()
      .into(imageView);
}

代码示例来源:origin: chrisbanes/PhotoView

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_immersive);
  PhotoView photoView = findViewById(R.id.photo_view);
  Picasso.with(this)
      .load("http://pbs.twimg.com/media/Bist9mvIYAAeAyQ.jpg")
      .into(photoView);
  photoView.setOnPhotoTapListener(new OnPhotoTapListener() {
    @Override
    public void onPhotoTap(ImageView view, float x, float y) {
      //fullScreen();
    }
  });
  fullScreen();
}

代码示例来源:origin: rey5137/material

public RecipientSpan(Recipient recipient) {
  super(TextUtils.isEmpty(recipient.name) ? recipient.number : recipient.name,
      mSpanHeight, mSpanMaxWidth, mSpanPaddingLeft, mSpanPaddingRight, mSpanTypeface, mSpanTextColor, mSpanTextSize, mSpanBackgroundColor);
  mRecipient = recipient;
  if(TextUtils.isEmpty(recipient.lookupKey))
    setImageResource(mDefaultAvatarId);
  else
    Picasso.with(getContext())
        .load(Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_LOOKUP_URI, recipient.lookupKey))
        .placeholder(mDefaultAvatarId)
        .into(this);
}

代码示例来源:origin: commonsguy/cw-omnibus

@Override
 void bindModel(Cursor row) {
  super.bindModel(row);

  Picasso.with(thumbnail.getContext())
   .load(videoUri.toString())
   .fit().centerCrop()
   .placeholder(R.drawable.ic_media_video_poster)
   .into(thumbnail);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showThumbnail() {
  Picasso.with(this)
   .load(imageUri)
   .fit().centerCrop()
   .placeholder(R.drawable.ic_photo_size_select_actual_black_24dp)
   .error(R.drawable.ic_error_black_24dp)
   .into(image);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showThumbnail() {
  Picasso.with(this)
   .load(imageUri)
   .fit().centerCrop()
   .placeholder(R.drawable.ic_photo_size_select_actual_black_24dp)
   .error(R.drawable.ic_error_black_24dp)
   .into(image);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showThumbnail() {
  Picasso.with(this)
   .load(imageUri)
   .fit().centerCrop()
   .placeholder(R.drawable.ic_photo_size_select_actual_black_24dp)
   .error(R.drawable.ic_error_black_24dp)
   .into(image);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

private void showThumbnail() {
  Picasso.with(this)
   .load(imageUri)
   .fit().centerCrop()
   .placeholder(R.drawable.ic_photo_size_select_actual_black_24dp)
   .error(R.drawable.ic_error_black_24dp)
   .into(image);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

protected void showThumbnail() {
 if (image!=null) {
  Picasso.with(this)
   .load(imageUri)
   .fit().centerCrop()
   .placeholder(
    R.drawable.ic_photo_size_select_actual_black_24dp)
   .error(R.drawable.ic_error_black_24dp)
   .into(image);
 }
}

代码示例来源:origin: commonsguy/cw-omnibus

@BindingAdapter({"app:imageUrl", "app:placeholder", "app:error"})
public static void bindImageView(ImageView iv,
                 String url,
                 Drawable placeholder,
                 Drawable error) {
 Picasso.with(iv.getContext())
  .load(url)
  .fit()
  .centerCrop()
  .placeholder(placeholder)
  .error(error)
  .into(iv);
}

代码示例来源:origin: commonsguy/cw-omnibus

protected void updateCardViewImage(String path) {
  Picasso.with(cardView.getContext())
      .load("file:///android_asset/" + path)
      .resize(convertDpToPixel(cardView.getContext(), CARD_WIDTH),
        convertDpToPixel(cardView.getContext(), CARD_HEIGHT))
      .into(viewTarget);
 }
}

相关文章