本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例10: InvisibleRecipientChip
import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public InvisibleRecipientChip(final RecipientEntry entry) {
super();
mDelegate = new SimpleRecipientChip(entry);
}
示例11: getEntry
import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
@Override
public RecipientEntry getEntry() {
return mDelegate.getEntry();
}
示例12: VisibleRecipientChip
import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
public VisibleRecipientChip(final Drawable drawable, final RecipientEntry entry) {
this(drawable, entry, DynamicDrawableSpan.ALIGN_BOTTOM);
}
示例13: getEntry
import com.android.ex.chips.RecipientEntry; //导入依赖的package包/类
@Override
public RecipientEntry getEntry() {
return mEntry;
}
示例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);
}
示例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());
}