use of cx.ring.tv.cards.contacts.ContactCard in project ring-client-android by savoirfairelinux.
the class RingSearchFragment method displayContact.
@Override
public void displayContact(final CallContact contact) {
getActivity().runOnUiThread(() -> {
mRowsAdapter.clear();
ArrayObjectAdapter listRowAdapter = new ArrayObjectAdapter(new CardPresenterSelector(getActivity()));
listRowAdapter.add(new ContactCard(contact, Card.Type.SEARCH_RESULT));
HeaderItem header = new HeaderItem(getActivity().getResources().getString(R.string.search_results));
mRowsAdapter.add(new ListRow(header, listRowAdapter));
});
}
use of cx.ring.tv.cards.contacts.ContactCard in project ring-client-android by savoirfairelinux.
the class MainFragment method refreshContact.
@Override
public void refreshContact(final int index, final TVListViewModel contact) {
getActivity().runOnUiThread(() -> {
ContactCard contactCard = (ContactCard) cardRowAdapter.get(index);
contactCard.setModel(contact);
cardRowAdapter.notifyArrayItemRangeChanged(index, 1);
});
}
Aggregations