Search in sources :

Example 11 with ContactListItemView

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;
}
Also used : DuplicatesUtils(com.android.contacts.util.DuplicatesUtils) ContactListItemView(com.android.contacts.common.list.ContactListItemView)

Example 12 with ContactListItemView

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;
}
Also used : ContactListItemView(com.android.contacts.common.list.ContactListItemView)

Example 13 with ContactListItemView

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);
}
Also used : ContactListItemView(com.android.contacts.common.list.ContactListItemView)

Example 14 with ContactListItemView

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;
}
Also used : ContactListItemView(com.android.contacts.common.list.ContactListItemView)

Example 15 with ContactListItemView

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;
}
Also used : ContactListItemView(com.android.contacts.common.list.ContactListItemView)

Aggregations

ContactListItemView (com.android.contacts.common.list.ContactListItemView)19 DuplicatesUtils (com.android.contacts.util.DuplicatesUtils)1 FilteredNumberAsyncQueryHandler (com.android.dialer.blocking.FilteredNumberAsyncQueryHandler)1 FilteredNumberAsyncQueryHandler (com.android.dialer.database.FilteredNumberAsyncQueryHandler)1