當前位置: 首頁>>代碼示例>>Java>>正文


Java Slide.hasVideo方法代碼示例

本文整理匯總了Java中org.thoughtcrime.securesms.mms.Slide.hasVideo方法的典型用法代碼示例。如果您正苦於以下問題:Java Slide.hasVideo方法的具體用法?Java Slide.hasVideo怎麽用?Java Slide.hasVideo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.thoughtcrime.securesms.mms.Slide的用法示例。


在下文中一共展示了Slide.hasVideo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getDraftsForCurrentState

import org.thoughtcrime.securesms.mms.Slide; //導入方法依賴的package包/類
private Drafts getDraftsForCurrentState() {
  Drafts drafts = new Drafts();

  if (!Util.isEmpty(composeText)) {
    drafts.add(new Draft(Draft.TEXT, composeText.getText().toString()));
  }

  for (Slide slide : attachmentManager.buildSlideDeck().getSlides()) {
    if      (slide.hasAudio() && slide.getUri() != null)    drafts.add(new Draft(Draft.AUDIO, slide.getUri().toString()));
    else if (slide.hasVideo() && slide.getUri() != null)    drafts.add(new Draft(Draft.VIDEO, slide.getUri().toString()));
    else if (slide.hasLocation())                           drafts.add(new Draft(Draft.LOCATION, ((LocationSlide)slide).getPlace().serialize()));
    else if (slide.hasImage() && slide.getUri() != null)    drafts.add(new Draft(Draft.IMAGE, slide.getUri().toString()));
  }

  return drafts;
}
 
開發者ID:XecureIT,項目名稱:PeSanKita-android,代碼行數:17,代碼來源:ConversationActivity.java

示例2: getDraftsForCurrentState

import org.thoughtcrime.securesms.mms.Slide; //導入方法依賴的package包/類
private Drafts getDraftsForCurrentState() {
    Drafts drafts = new Drafts();

    if (!Util.isEmpty(composeText)) {
      drafts.add(new Draft(Draft.TEXT, composeText.getTextTrimmed()));
    }

    for (Slide slide : attachmentManager.buildSlideDeck().getSlides()) {
      if      (slide.hasAudio() && slide.getUri() != null)    drafts.add(new Draft(Draft.AUDIO, slide.getUri().toString()));
      else if (slide.hasVideo() && slide.getUri() != null)    drafts.add(new Draft(Draft.VIDEO, slide.getUri().toString()));
// Location-TODO      else if (slide.hasLocation())                           drafts.add(new Draft(Draft.LOCATION, ((LocationSlide)slide).getPlace().serialize()));
      else if (slide.hasImage() && slide.getUri() != null)    drafts.add(new Draft(Draft.IMAGE, slide.getUri().toString()));
    }

    return drafts;
  }
 
開發者ID:CableIM,項目名稱:Cable-Android,代碼行數:17,代碼來源:ConversationActivity.java

示例3: getDraftsForCurrentState

import org.thoughtcrime.securesms.mms.Slide; //導入方法依賴的package包/類
private Drafts getDraftsForCurrentState() {
  Drafts drafts = new Drafts();

  if (!Util.isEmpty(composeText)) {
    drafts.add(new Draft(Draft.TEXT, composeText.getText().toString()));
  }

  for (Slide slide : attachmentManager.getSlideDeck().getSlides()) {
    if      (slide.hasAudio()) drafts.add(new Draft(Draft.AUDIO, slide.getUri().toString()));
    else if (slide.hasVideo()) drafts.add(new Draft(Draft.VIDEO, slide.getUri().toString()));
    else if (slide.hasImage()) drafts.add(new Draft(Draft.IMAGE, slide.getUri().toString()));
  }

  return drafts;
}
 
開發者ID:redcracker,項目名稱:TextSecure,代碼行數:16,代碼來源:ConversationActivity.java


注:本文中的org.thoughtcrime.securesms.mms.Slide.hasVideo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。