Search in sources :

Example 1 with DefaultContactListAdapter

use of com.android.contacts.common.list.DefaultContactListAdapter in project android_packages_apps_Dialer by MoKee.

the class AllContactsFragment method createListAdapter.

@Override
protected ContactEntryListAdapter createListAdapter() {
    final DefaultContactListAdapter adapter = new DefaultContactListAdapter(getActivity()) {

        @Override
        protected void bindView(View itemView, int partition, Cursor cursor, int position) {
            super.bindView(itemView, partition, cursor, position);
            itemView.setTag(this.getContactUri(partition, cursor));
        }
    };
    adapter.setDisplayPhotos(true);
    adapter.setFilter(ContactListFilter.createFilterWithType(ContactListFilter.FILTER_TYPE_DEFAULT));
    adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
    return adapter;
}
Also used : DefaultContactListAdapter(com.android.contacts.common.list.DefaultContactListAdapter) Cursor(android.database.Cursor) View(android.view.View) AdapterView(android.widget.AdapterView) EmptyContentView(com.android.dialer.widget.EmptyContentView)

Example 2 with DefaultContactListAdapter

use of com.android.contacts.common.list.DefaultContactListAdapter in project packages_apps_Contacts by AOKP.

the class MultiSelectContactsListFragment method createListAdapter.

@Override
protected ContactListAdapter createListAdapter() {
    DefaultContactListAdapter adapter = new MultiSelectEntryContactListAdapter(getContext());
    adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
    adapter.setDisplayPhotos(true);
    adapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(/* opposite = */
    false));
    return adapter;
}
Also used : DefaultContactListAdapter(com.android.contacts.common.list.DefaultContactListAdapter)

Example 3 with DefaultContactListAdapter

use of com.android.contacts.common.list.DefaultContactListAdapter in project android_packages_apps_Dialer by LineageOS.

the class AllContactsFragment method createListAdapter.

@Override
protected ContactEntryListAdapter createListAdapter() {
    final DefaultContactListAdapter adapter = new DefaultContactListAdapter(getActivity()) {

        @Override
        protected void bindView(View itemView, int partition, Cursor cursor, int position) {
            super.bindView(itemView, partition, cursor, position);
            itemView.setTag(this.getContactUri(partition, cursor));
        }
    };
    adapter.setDisplayPhotos(true);
    adapter.setFilter(ContactListFilter.createFilterWithType(ContactListFilter.FILTER_TYPE_DEFAULT));
    adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
    return adapter;
}
Also used : DefaultContactListAdapter(com.android.contacts.common.list.DefaultContactListAdapter) Cursor(android.database.Cursor) View(android.view.View) AdapterView(android.widget.AdapterView) EmptyContentView(com.android.dialer.widget.EmptyContentView)

Example 4 with DefaultContactListAdapter

use of com.android.contacts.common.list.DefaultContactListAdapter in project packages_apps_Contacts by AOKP.

the class DefaultContactBrowseListFragment method createListAdapter.

@Override
protected ContactListAdapter createListAdapter() {
    DefaultContactListAdapter adapter = new DefaultContactListAdapter(getContext());
    adapter.setSectionHeaderDisplayEnabled(isSectionHeaderDisplayEnabled());
    adapter.setDisplayPhotos(true);
    adapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(/* opposite = */
    false));
    return adapter;
}
Also used : DefaultContactListAdapter(com.android.contacts.common.list.DefaultContactListAdapter)

Aggregations

DefaultContactListAdapter (com.android.contacts.common.list.DefaultContactListAdapter)4 Cursor (android.database.Cursor)2 View (android.view.View)2 AdapterView (android.widget.AdapterView)2 EmptyContentView (com.android.dialer.widget.EmptyContentView)2