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

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

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

Picasso.get介绍

暂无

代码示例

代码示例来源:origin: jkwiecien/EasyImage

@Override
public void onBindViewHolder(ViewHolder holder, int position) {
  Picasso.get()
      .load(imagesFiles.get(position))
      .fit()
      .centerCrop()
      .into(holder.imageView);
}

代码示例来源:origin: codeka/wwmmo

public static void setDesignIcon(Design design, ImageView imageView) {
  Picasso.get()
    .load("file:///android_asset/sprites/" + design.image_url)
    .into(imageView);
 }
}

代码示例来源:origin: codeka/wwmmo

/**
 * Bind an image with the given URL to the given {@link ImageView}.
 */
public static void bindImage(ImageView view, String imageUrl) {
 Picasso.get()
   .load(imageUrl)
   .into(view);
}

代码示例来源:origin: AliEsaAssadi/Android-MVP-Architecture

@Override
public void showMovieDetails(String imageUrl, String title, String description) {
  mTitle.setText(title);
  mDesc.setText(description);
  Picasso.get().load(imageUrl).into(mImage);
}

代码示例来源:origin: codeka/wwmmo

public void refreshEmpireDetails(Empire empire) {
 empireName.setText(empire.display_name);
 Picasso.get()
   .load(ImageHelper.getEmpireImageUrl(getContext(), empire, 20, 20))
   .into(empireIcon);
}

代码示例来源:origin: contentful/gallery-app-android

@Override public Object instantiateItem(ViewGroup container, int position) {
 Context context = container.getContext();
 ImageView imageView = new ImageView(context);
 imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
 Picasso.get().load(Utils.imageUrl(images.get(position).photo().url())).into(imageView);
 container.addView(imageView);
 return imageView;
}

代码示例来源:origin: anitaa1990/TrailersApp

public void bindTo(TvEntity tvEntity) {
    Picasso.get().load(tvEntity.getPosterPath())
        .placeholder(R.drawable.ic_placeholder)
        .into(binding.image);
  }
}

代码示例来源:origin: anitaa1990/TrailersApp

@Override
public void onBindViewHolder(CustomViewHolder holder, int position) {
  MovieEntity movie = getItem(position);
  String imageUrl = movie.getPosterPath();
  Picasso.get().load(imageUrl).into(holder.binding.itemImg);
}

代码示例来源:origin: cloudinary/cloudinary_android

@Override
  public void onUrlReady(Url url) {
    Picasso.get().load(url.generate()).placeholder(R.drawable.placeholder).into(holder.imageView);
  }
});

代码示例来源:origin: anitaa1990/ConstraintLayout-Sample

@Override
public void onBindViewHolder(CustomViewHolder holder, int position) {
  Movie movie = getItem(position);
  String imageUrl = movie.getPosterPath();
  Picasso.get().load(imageUrl).into(holder.binding.itemImg);
}

代码示例来源:origin: cloudinary/cloudinary_android

@Override
  public void onUrlReady(Url url) {
    Picasso.get().load(url.generate()).placeholder(placeholder).into(holder.imageView);
  }
});

代码示例来源:origin: anitaa1990/TrailersApp

@Override
public void onBindViewHolder(CustomViewHolder holder, int position) {
  TvEntity item = getItem(position);
  String imageUrl = item.getPosterPath();
  Picasso.get().load(imageUrl).into(holder.binding.itemImg);
}

代码示例来源:origin: cloudinary/cloudinary_android

private void bindErrorView(FailedResourceViewHolder holder, int position) {
  ResourceWithMeta resourceWithMeta = resources.get(position);
  final Resource resource = resourceWithMeta.resource;
  holder.errorDescription.setText(resource.getLastErrorDesc());
  boolean isVideo = resource.getResourceType().equals("video");
  int placeHolder = isVideo ? R.drawable.video_placeholder : R.drawable.placeholder;
  Picasso.get().load(resource.getLocalUri()).placeholder(placeHolder).centerCrop().resizeDimen(R.dimen.card_image_width, R.dimen.card_height).into(holder.imageView);
  holder.retryButton.setTag(resource);
  holder.cancelButton.setTag(resource);
  holder.rescheduleLabel.setVisibility(resource.getStatus() == Resource.UploadStatus.RESCHEDULED ? View.VISIBLE : View.GONE);
  holder.filename.setText(resource.getName());
}

代码示例来源:origin: freedom10086/Ruisi

void setData(final int position) {
    final ChatListData single = DataSets.get(position);
    Picasso.get().load(single.getUserImage()).into(avatar);
    time.setText(single.getTime());
    HtmlView.parseHtml(single.getContent()).into(content);
  }
}

代码示例来源:origin: freedom10086/Ruisi

@Override
protected void onStart() {
  super.onStart();
  Picasso.get()
      .load(UrlUtils.getAvaterurlb(App.getUid(this)))
      .placeholder(R.drawable.image_placeholder)
      .into(userImage);
}

代码示例来源:origin: contentful/gallery-app-android

private void loadPhoto(ImageView imageView, String url) {
 Picasso.get()
   .load(Utils.imageUrl(url, imageSize, imageSize))
   .fit()
   .centerCrop()
   .placeholder(R.drawable.grid_placeholder)
   .into(imageView);
}

代码示例来源:origin: contentful/gallery-app-android

@Override public void onDestroy() {
 cancelPaletteTask();
 if (target != null) {
  Picasso.get().cancelRequest(target);
  target = null;
 }
 bitmap = null;
 super.onDestroy();
}

代码示例来源:origin: anitaa1990/TrailersApp

private void initialiseView() {
  binding = DataBindingUtil.setContentView(this, R.layout.activity_detail);
  MovieEntity movie = getIntent().getParcelableExtra(INTENT_MOVIE);
  Picasso.get().load(movie.getPosterPath()).into(binding.image);
  ViewCompat.setTransitionName(binding.image, TRANSITION_IMAGE_NAME);
  binding.expandButton.setPaintFlags(binding.expandButton.getPaintFlags() |  Paint.UNDERLINE_TEXT_FLAG);
}

代码示例来源:origin: anitaa1990/TrailersApp

private void initialiseView() {
  binding = DataBindingUtil.setContentView(this, R.layout.activity_detail);
  TvEntity tvEntity = getIntent().getParcelableExtra(INTENT_MOVIE);
  Picasso.get().load(tvEntity.getPosterPath()).into(binding.image);
  ViewCompat.setTransitionName(binding.image, TRANSITION_IMAGE_NAME);
  binding.expandButton.setPaintFlags(binding.expandButton.getPaintFlags() |  Paint.UNDERLINE_TEXT_FLAG);
}

代码示例来源:origin: cloudinary/cloudinary_android

@Override
public void onDeleteAllLocally() {
  ResourceRepo.getInstance().clear();
  MediaManager.get().cancelAllRequests();
  PicassoTools.clearCache(Picasso.get());
  for (AbstractPagerFragment fragment : getPages()) {
    fragment.clearData();
  }
}

相关文章