Search in sources :

Example 11 with AbstractContact

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));
}
Also used : UserJid(com.xabber.android.data.entity.UserJid) AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 12 with AbstractContact

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());
}
Also used : TextView(android.widget.TextView) ImageView(android.widget.ImageView) AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 13 with AbstractContact

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());
}
Also used : UserJid(com.xabber.android.data.entity.UserJid) TextView(android.widget.TextView) ImageView(android.widget.ImageView) AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 14 with AbstractContact

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;
}
Also used : TextView(android.widget.TextView) AbstractContact(com.xabber.android.data.roster.AbstractContact)

Example 15 with AbstractContact

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();
}
Also used : AbstractContact(com.xabber.android.data.roster.AbstractContact)

Aggregations

AbstractContact (com.xabber.android.data.roster.AbstractContact)22 AbstractChat (com.xabber.android.data.message.AbstractChat)6 UserJid (com.xabber.android.data.entity.UserJid)5 RoomContact (com.xabber.android.data.extension.muc.RoomContact)5 ArrayList (java.util.ArrayList)5 TextView (android.widget.TextView)4 RoomChat (com.xabber.android.data.extension.muc.RoomChat)4 ChatContact (com.xabber.android.data.message.ChatContact)4 RosterContact (com.xabber.android.data.roster.RosterContact)4 GroupConfiguration (com.xabber.android.ui.adapter.contactlist.GroupConfiguration)4 AccountJid (com.xabber.android.data.entity.AccountJid)3 GroupVO (com.xabber.android.presentation.ui.contactlist.viewobjects.GroupVO)3 IFlexible (eu.davidea.flexibleadapter.items.IFlexible)3 ImageView (android.widget.ImageView)2 CommonState (com.xabber.android.data.account.CommonState)2 Collection (java.util.Collection)2 Map (java.util.Map)2 TreeMap (java.util.TreeMap)2 AdapterContextMenuInfo (android.widget.AdapterView.AdapterContextMenuInfo)1 AccountItem (com.xabber.android.data.account.AccountItem)1