use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.
the class BlockedListAdapter method onBindViewHolder.
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
final BlockListItemViewHolder viewHolder = (BlockListItemViewHolder) holder;
final UserJid contact = blockedContacts.get(position);
final AbstractContact rosterContact = RosterManager.getInstance().getBestContact(account, contact);
if (viewHolder.avatar != null) {
viewHolder.avatar.setImageDrawable(rosterContact.getAvatarForContactList());
}
viewHolder.name.setText(rosterContact.getName());
viewHolder.name.setVisibility(View.VISIBLE);
viewHolder.checkBox.setChecked(checkedContacts.contains(contact));
}
use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.
the class BaseContactDialog method setUpContactTitleView.
protected void setUpContactTitleView(View view) {
final AbstractContact bestContact = RosterManager.getInstance().getBestContact(account, contact);
((ImageView) view.findViewById(R.id.avatar)).setImageDrawable(bestContact.getAvatar());
((TextView) view.findViewById(R.id.name)).setText(bestContact.getName());
((TextView) view.findViewById(R.id.status_text)).setText(contact.toString());
}
use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.
the class MucInviteDialog method setUpContactTitleView.
@Override
protected void setUpContactTitleView(View view) {
roomInvite = MUCManager.getInstance().getInvite(getAccount(), getContact().getJid().asEntityBareJidIfPossible());
final UserJid inviter = roomInvite.getInviter().getBareUserJid();
final AbstractContact bestContact = RosterManager.getInstance().getBestContact(getAccount(), inviter);
((ImageView) view.findViewById(R.id.avatar)).setImageDrawable(bestContact.getAvatar());
((TextView) view.findViewById(R.id.name)).setText(bestContact.getName());
((TextView) view.findViewById(R.id.status_text)).setText(inviter.toString());
}
use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.
the class FingerprintActivity method update.
private void update() {
isUpdating = true;
AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user);
verifiedView.setChecked(OTRManager.getInstance().isVerified(account, user));
scanView.setEnabled(remoteFingerprint != null);
verifiedView.setEnabled(remoteFingerprint != null);
((TextView) findViewById(R.id.otr_remote_fingerprint)).setText(remoteFingerprint == null ? getString(R.string.unknown) : showFingerprint(remoteFingerprint));
showView.setEnabled(localFingerprint != null);
copyView.setEnabled(localFingerprint != null);
((TextView) findViewById(R.id.otr_local_fingerprint)).setText(localFingerprint == null ? getString(R.string.unknown) : showFingerprint(localFingerprint));
contactTitleActionBarInflater.update(abstractContact);
isUpdating = false;
}
use of com.xabber.android.data.roster.AbstractContact in project xabber-android by redsolution.
the class GroupEditActivity method update.
private void update() {
AbstractContact abstractContact = RosterManager.getInstance().getBestContact(account, user);
contactTitleActionBarInflater.update(abstractContact);
contactTitleActionBarInflater.setStatusText(user.toString());
// contactTitleActionBarInflater.hideStatusIcon();
}
Aggregations