use of com.android.contacts.common.list.ContactListItemView in project android_packages_apps_Dialer by LineageOS.
the class BlockedListSearchAdapter method bindView.
@Override
protected void bindView(View itemView, int partition, Cursor cursor, int position) {
super.bindView(itemView, partition, cursor, position);
final ContactListItemView view = (ContactListItemView) itemView;
// Reset view state to unblocked.
setViewUnblocked(view);
final String number = getPhoneNumber(position);
final String countryIso = GeoUtil.getCurrentCountryIso(mContext);
final FilteredNumberAsyncQueryHandler.OnCheckBlockedListener onCheckListener = new FilteredNumberAsyncQueryHandler.OnCheckBlockedListener() {
@Override
public void onCheckComplete(Integer id) {
if (id != null && id != FilteredNumberAsyncQueryHandler.INVALID_ID) {
setViewBlocked(view, id);
}
}
};
mFilteredNumberAsyncQueryHandler.isBlockedNumber(onCheckListener, number, countryIso);
}
use of com.android.contacts.common.list.ContactListItemView in project android_packages_apps_Dialer by LineageOS.
the class DialerPhoneNumberListAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final int shortcutType = getShortcutTypeFromPosition(position);
if (shortcutType >= 0) {
if (convertView != null) {
assignShortcutToView((ContactListItemView) convertView, shortcutType);
return convertView;
} else {
final ContactListItemView v = new ContactListItemView(getContext(), null, mIsImsVideoEnabled);
assignShortcutToView(v, shortcutType);
return v;
}
} else {
return super.getView(position, convertView, parent);
}
}
use of com.android.contacts.common.list.ContactListItemView in project android_packages_apps_Dialer by MoKee.
the class BlockedListSearchAdapter method bindView.
@Override
protected void bindView(View itemView, int partition, Cursor cursor, int position) {
super.bindView(itemView, partition, cursor, position);
final ContactListItemView view = (ContactListItemView) itemView;
// Reset view state to unblocked.
setViewUnblocked(view);
final String number = getPhoneNumber(position);
final String countryIso = GeoUtil.getCurrentCountryIso(mContext);
final FilteredNumberAsyncQueryHandler.OnCheckBlockedListener onCheckListener = new FilteredNumberAsyncQueryHandler.OnCheckBlockedListener() {
@Override
public void onCheckComplete(Integer id) {
if (id != null) {
setViewBlocked(view, id);
}
}
};
mFilteredNumberAsyncQueryHandler.isBlockedNumber(onCheckListener, number, countryIso);
}
use of com.android.contacts.common.list.ContactListItemView in project android_packages_apps_Dialer by MoKee.
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(mVideoCallingEnabled);
return view;
}
use of com.android.contacts.common.list.ContactListItemView in project android_packages_apps_Dialer by MoKee.
the class DialerPhoneNumberListAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final int shortcutType = getShortcutTypeFromPosition(position);
if (shortcutType >= 0) {
if (convertView != null) {
assignShortcutToView((ContactListItemView) convertView, shortcutType);
return convertView;
} else {
final ContactListItemView v = new ContactListItemView(getContext(), null, mVideoCallingEnabled);
assignShortcutToView(v, shortcutType);
return v;
}
} else {
return super.getView(position, convertView, parent);
}
}
Aggregations