当前位置: 首页>>代码示例>>Java>>正文


Java Slide.getThumbnailUri方法代码示例

本文整理汇总了Java中org.thoughtcrime.securesms.mms.Slide.getThumbnailUri方法的典型用法代码示例。如果您正苦于以下问题:Java Slide.getThumbnailUri方法的具体用法?Java Slide.getThumbnailUri怎么用?Java Slide.getThumbnailUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.thoughtcrime.securesms.mms.Slide的用法示例。


在下文中一共展示了Slide.getThumbnailUri方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hasBigPictureSlide

import org.thoughtcrime.securesms.mms.Slide; //导入方法依赖的package包/类
private boolean hasBigPictureSlide(@Nullable SlideDeck slideDeck) {
  if (masterSecret == null || slideDeck == null || Build.VERSION.SDK_INT < 16) {
    return false;
  }

  Slide thumbnailSlide = slideDeck.getThumbnailSlide();

  return thumbnailSlide != null         &&
         thumbnailSlide.hasImage()      &&
         !thumbnailSlide.isInProgress() &&
         thumbnailSlide.getThumbnailUri() != null;
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:13,代码来源:SingleRecipientNotificationBuilder.java

示例2: getAttachmentUriFor

import org.thoughtcrime.securesms.mms.Slide; //导入方法依赖的package包/类
private @Nullable Uri getAttachmentUriFor(MessageRecord record) {
  if (!record.isMms() || record.isMmsNotification() || record.isGroupAction()) return null;

  SlideDeck slideDeck = ((MediaMmsMessageRecord)record).getSlideDeck();
  Slide     thumbnail = slideDeck.getThumbnailSlide();

  return thumbnail != null ? thumbnail.getThumbnailUri() : null;
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:9,代码来源:ThreadDatabase.java

示例3: setImageResource

import org.thoughtcrime.securesms.mms.Slide; //导入方法依赖的package包/类
public void setImageResource(@NonNull MasterSecret masterSecret, @NonNull Slide slide, boolean showControls) {
  if (showControls) {
    getTransferControls().setSlide(slide);
    getTransferControls().setDownloadClickListener(new DownloadClickDispatcher());
  } else if (transferControls.isPresent()) {
    getTransferControls().setVisibility(View.GONE);
  }

  if (slide.getThumbnailUri() != null && slide.hasPlayOverlay() && slide.getTransferState() == AttachmentDatabase.TRANSFER_PROGRESS_DONE) {
    this.playOverlay.setVisibility(View.VISIBLE);
  } else {
    this.playOverlay.setVisibility(View.GONE);
  }

  if (Util.equals(slide, this.slide)) {
    Log.w(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri());
    return;
  }

  if (!isContextValid()) {
    Log.w(TAG, "Not loading slide, context is invalid");
    return;
  }

  Log.w(TAG, "loading part with id " + slide.asAttachment().getDataUri()
             + ", progress " + slide.getTransferState());

  this.slide = slide;

  if      (slide.getThumbnailUri() != null) buildThumbnailGlideRequest(slide, masterSecret).into(image);
  else if (slide.hasPlaceholder())          buildPlaceholderGlideRequest(slide).into(image);
  else                                      Glide.clear(image);
}
 
开发者ID:XecureIT,项目名称:PeSanKita-android,代码行数:34,代码来源:ThumbnailView.java

示例4: setImageResource

import org.thoughtcrime.securesms.mms.Slide; //导入方法依赖的package包/类
public void setImageResource(@NonNull MasterSecret masterSecret, @NonNull Slide slide, boolean showControls, boolean isPreview) {
  if (showControls) {
    getTransferControls().setSlide(slide);
    getTransferControls().setDownloadClickListener(new DownloadClickDispatcher());
  } else if (transferControls.isPresent()) {
    getTransferControls().setVisibility(View.GONE);
  }

  if (slide.getThumbnailUri() != null && slide.hasPlayOverlay() &&
      (slide.getTransferState() == AttachmentDatabase.TRANSFER_PROGRESS_DONE || isPreview))
  {
    this.playOverlay.setVisibility(View.VISIBLE);
  } else {
    this.playOverlay.setVisibility(View.GONE);
  }

  if (Util.equals(slide, this.slide)) {
    Log.w(TAG, "Not re-loading slide " + slide.asAttachment().getDataUri());
    return;
  }

  if (this.slide != null && this.slide.getFastPreflightId() != null &&
      this.slide.getFastPreflightId().equals(slide.getFastPreflightId()))
  {
    Log.w(TAG, "Not re-loading slide for fast preflight: " + slide.getFastPreflightId());
    this.slide = slide;
    return;
  }

  if (!isContextValid()) {
    Log.w(TAG, "Not loading slide, context is invalid");
    return;
  }

  Log.w(TAG, "loading part with id " + slide.asAttachment().getDataUri()
             + ", progress " + slide.getTransferState() + ", fast preflight id: " +
             slide.asAttachment().getFastPreflightId());

  this.slide = slide;

  if      (slide.getThumbnailUri() != null) buildThumbnailGlideRequest(slide, masterSecret).into(image);
  else if (slide.hasPlaceholder())          buildPlaceholderGlideRequest(slide).into(image);
  else                                      Glide.clear(image);
}
 
开发者ID:CableIM,项目名称:Cable-Android,代码行数:45,代码来源:ThumbnailView.java


注:本文中的org.thoughtcrime.securesms.mms.Slide.getThumbnailUri方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。