use of com.android.contacts.common.list.ContactListItemView in project packages_apps_Contacts by AOKP.
the class MergeContactAdapter method getView.
@Override
public View getView(int position, View view, ViewGroup parent) {
ViewHolder viewHolder;
if (view == null) {
viewHolder = new ViewHolder();
view = LayoutInflater.from(mContext).inflate(R.layout.merge_row, parent, false);
viewHolder.inner = (LinearLayout) view.findViewById(R.id.item_container);
viewHolder.box = (CheckBox) view.findViewById(R.id.row_box);
view.setTag(viewHolder);
} else {
viewHolder = (ViewHolder) view.getTag();
}
DuplicatesUtils.MergeContacts item = (DuplicatesUtils.MergeContacts) getItem(position);
viewHolder.box.setChecked(item.isChecked());
viewHolder.inner.removeAllViews();
// remove the inner cache items and add the new ones.
ArrayList<DuplicatesUtils.ContactsInfo> childItem = item.getContacts();
// bind data with each inner item and add it to the container.
for (int i = 0; i < childItem.size(); i++) {
ContactListItemView childView = new ContactListItemView(mContext, null);
bindItem(item, childItem.get(i), childView);
viewHolder.inner.addView(childView);
}
return view;
}
use of com.android.contacts.common.list.ContactListItemView in project packages_apps_Contacts by AOKP.
the class PostalAddressListAdapter method newView.
@Override
protected ContactListItemView newView(Context context, int partition, Cursor cursor, int position, ViewGroup parent) {
ContactListItemView view = super.newView(context, partition, cursor, position, parent);
view.setUnknownNameText(mUnknownNameText);
view.setQuickContactEnabled(isQuickContactEnabled());
view.setIsSectionHeaderEnabled(isSectionHeaderDisplayEnabled());
return view;
}
use of com.android.contacts.common.list.ContactListItemView in project packages_apps_Contacts by AOKP.
the class PostalAddressListAdapter method bindView.
@Override
protected void bindView(View itemView, int partition, Cursor cursor, int position) {
super.bindView(itemView, partition, cursor, position);
ContactListItemView view = (ContactListItemView) itemView;
bindSectionHeaderAndDivider(view, position);
bindName(view, cursor);
bindViewId(view, cursor, PostalQuery.POSTAL_ID);
bindPhoto(view, cursor);
bindPostalAddress(view, cursor);
}
use of com.android.contacts.common.list.ContactListItemView in project android_packages_apps_Dialer by LineageOS.
the class DialerPhoneNumberListAdapter method newView.
@Override
protected ContactListItemView newView(Context context, int partition, Cursor cursor, int position, ViewGroup parent) {
final ContactListItemView view = super.newView(context, partition, cursor, position, parent);
view.setSupportVideoCallIcon(mIsImsVideoEnabled);
return view;
}
use of com.android.contacts.common.list.ContactListItemView in project packages_apps_Contacts by AOKP.
the class EmailAddressListAdapter method newView.
@Override
protected ContactListItemView newView(Context context, int partition, Cursor cursor, int position, ViewGroup parent) {
ContactListItemView view = super.newView(context, partition, cursor, position, parent);
view.setUnknownNameText(mUnknownNameText);
view.setQuickContactEnabled(isQuickContactEnabled());
return view;
}
Aggregations