當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。