@Override
    public View getView(final int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      ViewGroupHolder viewholder = null;
      if (convertView == null) {
        viewholder = new ViewGroupHolder();

        final LayoutInflater inflater =
            (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        convertView = inflater.inflate(R.layout.quick_group_contact_item, null);

        viewholder.imageUser = (ImageView) convertView.findViewById(R.id.iv_contact);
        viewholder.tvName = (TextView) convertView.findViewById(R.id.tv_name);

        convertView.setTag(viewholder);
      } else {
        viewholder = (ViewGroupHolder) convertView.getTag();
      }

      NmsContact c = memberList.get(position);

      if (c != null) {
        viewholder.tvName.setText(c.getName());
        mImageWorker.loadImage(c.getId(), viewholder.imageUser);
      }

      return convertView;
    }
Ejemplo n.º 2
0
 public NmsUIContact getContactInfoViaEngineContactId(short engineContactId) {
   NmsUIContact contact = new NmsUIContact();
   NmsContact tmp = engineadapter.get().nmsUIGetContact(engineContactId);
   contact.setEngineContactId(engineContactId);
   contact.setSystemContactId(engineContactId);
   contact.setType(NmsContactType.HISSAGE_USER);
   contact.setName(tmp.getName());
   contact.setNumberOrEmail(tmp.getNumber());
   return contact;
 }