Search in sources :

Example 1 with ConnectRequestInboxRow

use of com.waz.zclient.pages.main.connect.views.ConnectRequestInboxRow in project wire-android by wireapp.

the class ConnectRequestInboxAdapter method getView.

@Override
public View getView(int position, View convertView, ViewGroup parent) {
    ViewHolder viewHolder;
    if (convertView == null) {
        convertView = new ConnectRequestInboxRow(parent.getContext());
        viewHolder = new ViewHolder();
        viewHolder.nameView = ViewUtils.getView(convertView, R.id.ttv__connect_request__display_name);
        viewHolder.separatorView = ViewUtils.getView(convertView, R.id.v__connect_request__separator_line);
        convertView.setTag(viewHolder);
    } else {
        viewHolder = (ViewHolder) convertView.getTag();
    }
    // Set valuesCon
    IConversation request = getItem(position);
    viewHolder.nameView.setText(request.getName());
    TextViewUtils.boldText(viewHolder.nameView);
    ((ConnectRequestInboxRow) convertView).setConnectActionCallback(connectActionsCallback);
    ((ConnectRequestInboxRow) convertView).setAccentColor(accentColor);
    ((ConnectRequestInboxRow) convertView).loadUser(request.getOtherParticipant());
    if (LayoutSpec.isPhone(context)) {
        if (position == 0) {
            viewHolder.separatorView.setVisibility(View.GONE);
        } else {
            viewHolder.separatorView.setVisibility(View.VISIBLE);
        }
    }
    return convertView;
}
Also used : IConversation(com.waz.api.IConversation) ConnectRequestInboxRow(com.waz.zclient.pages.main.connect.views.ConnectRequestInboxRow)

Aggregations

IConversation (com.waz.api.IConversation)1 ConnectRequestInboxRow (com.waz.zclient.pages.main.connect.views.ConnectRequestInboxRow)1