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


Java RecipientEntry类代码示例

本文整理汇总了Java中com.android.ex.chips.RecipientEntry的典型用法代码示例。如果您正苦于以下问题:Java RecipientEntry类的具体用法?Java RecipientEntry怎么用?Java RecipientEntry使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: chipsToRecipients

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public static List<Recipient> chipsToRecipients(DrawableRecipientChip[] chips) {
    List<Recipient> recipients = new ArrayList<>();
    for (DrawableRecipientChip chip : chips) {
        RecipientEntry re = chip.getEntry();
        Recipient r = new Recipient(re.getDisplayName());
        r.setPhone(re.getDestination());
        if (re.getPhotoThumbnailUri() != null) {
            r.setPictureUrl(re.getPhotoThumbnailUri().toString());
        }
        r.setContactId(re.getContactId());
        r.setDataId(re.getDataId());
        r.setDestinationType(re.getDestinationType());
        r.setLookupKey(re.getLookupKey());
        recipients.add(r);
    }
    return recipients;
}
 
开发者ID:jordond,项目名称:hooold,代码行数:18,代码来源:Recipient.java

示例2: SimpleRecipientChip

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public SimpleRecipientChip(final RecipientEntry entry) {
    mDisplay = entry.getDisplayName();
    mValue = entry.getDestination().trim();
    mContactId = entry.getContactId();
    mDirectoryId = entry.getDirectoryId();
    mLookupKey = entry.getLookupKey();
    mDataId = entry.getDataId();
    mEntry = entry;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:10,代码来源:SimpleRecipientChip.java

示例3: chipsToList

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public static List<RecipientEntry> chipsToList(DrawableRecipientChip[] chips) {
    List<RecipientEntry> list = new ArrayList<>();
    for (DrawableRecipientChip chip : chips) {
        list.add(chip.getEntry());
    }
    return list;
}
 
开发者ID:jordond,项目名称:hooold,代码行数:8,代码来源:HoooldUtils.java

示例4: populate

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public void populate(Message message) {
    if (message != null) {
        List<RecipientEntry> recipients = message.getRecipientEntries();
        mContact.setRecipientEntries(recipients);
        setDate(message.getScheduleDate());
        mDate.setText(HoooldUtils.toFancyDate(message.getScheduleDate()));
        mMessageText.setText(message.getMessage());
        mMessage = message;
    }
}
 
开发者ID:jordond,项目名称:hooold,代码行数:11,代码来源:CreateActivity.java

示例5: getRecipientEntries

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
/**
 * Helpers
 */

public List<RecipientEntry> getRecipientEntries() {
    List<RecipientEntry> list = new ArrayList<>();
    for (Recipient recipient : this.getRecipients()) {
        list.add(recipient.toRecipientEntry());
    }
    return list;
}
 
开发者ID:jordond,项目名称:hooold,代码行数:12,代码来源:Message.java

示例6: generateFakeRecipientsEntries

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
private List<RecipientEntry> generateFakeRecipientsEntries()
{
final List<RecipientEntry> allEntries=new ArrayList<RecipientEntry>();
for(int i=0;i<100;++i)
  {
  final RecipientEntry entry=RecipientEntry.constructTopLevelEntry("abc"+i,DisplayNameSources.NICKNAME,"address"+i,0,null,i,i,(String)null,true,false);
  allEntries.add(entry);
  }
return allEntries;
}
 
开发者ID:AndroidDeveloperLB,项目名称:ChipsLibrary,代码行数:11,代码来源:CustomRecipientFragment.java

示例7: removeRandomRecipient

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
private void removeRandomRecipient(final RecipientEditTextView view)
{
final List<RecipientEntry> recipients=new ArrayList<RecipientEntry>(view.getChosenRecipients());
final int count=recipients.size();
if(count==0)
  return;
final int idx=mRandom.nextInt(count);
view.removeRecipient(recipients.get(idx),true);
// Log.d("Applog","data after removing a random recipient:");
// printAllItems(view);
}
 
开发者ID:AndroidDeveloperLB,项目名称:ChipsLibrary,代码行数:12,代码来源:CustomRecipientFragment.java

示例8: addRandomRecipient

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
private void addRandomRecipient(final RecipientEditTextView view,final List<RecipientEntry> allEntries)
{
final int idx=mRandom.nextInt(allEntries.size());
view.addRecipient(allEntries.get(idx),true);
// Log.d("Applog","data after adding a random recipient:");
// printAllItems(view);
}
 
开发者ID:AndroidDeveloperLB,项目名称:ChipsLibrary,代码行数:8,代码来源:CustomRecipientFragment.java

示例9: SimpleRecipientChip

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public SimpleRecipientChip(final RecipientEntry entry) {
	mDisplay = entry.getDisplayName();
	mValue = entry.getDestination().trim();
	mContactId = entry.getContactId();
	mDataId = entry.getDataId();
	mEntry = entry;
}
 
开发者ID:AndroidDeveloperLB,项目名称:ChipsLibrary,代码行数:8,代码来源:SimpleRecipientChip.java

示例10: InvisibleRecipientChip

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public InvisibleRecipientChip(final RecipientEntry entry) {
    super();

    mDelegate = new SimpleRecipientChip(entry);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:6,代码来源:InvisibleRecipientChip.java

示例11: getEntry

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
@Override
public RecipientEntry getEntry() {
    return mDelegate.getEntry();
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:5,代码来源:InvisibleRecipientChip.java

示例12: VisibleRecipientChip

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public VisibleRecipientChip(final Drawable drawable, final RecipientEntry entry) {
    this(drawable, entry, DynamicDrawableSpan.ALIGN_BOTTOM);
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:4,代码来源:VisibleRecipientChip.java

示例13: getEntry

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
@Override
public RecipientEntry getEntry() {
    return mEntry;
}
 
开发者ID:jianliaoim,项目名称:talk-android,代码行数:5,代码来源:SimpleRecipientChip.java

示例14: toRecipientEntry

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public RecipientEntry toRecipientEntry() {
    Uri photo = this.pictureUrl == null ? null : Uri.parse(this.pictureUrl);
    return RecipientEntry.rebuildEntry(
            name, phone, photo, contactId,dataId, destinationType, lookupKey);
}
 
开发者ID:jordond,项目名称:hooold,代码行数:6,代码来源:Recipient.java

示例15: printAllItems

import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
private void printAllItems(final RecipientEditTextView view)
{
final Collection<RecipientEntry> recipients=view.getChosenRecipients();
for(final RecipientEntry entry : recipients)
  android.util.Log.d("Applog",entry.getContactId()+" "+entry.getDisplayName());
}
 
开发者ID:AndroidDeveloperLB,项目名称:ChipsLibrary,代码行数:7,代码来源:ContactsRecipientsFragment.java


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