use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class ContactSearchAdapter method getView.
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
Holder h;
if (convertView == null) {
h = new Holder();
convertView = View.inflate(mContext, R.layout.contact_child_item, null);
h.mAvatar = (ImageView) convertView.findViewById(R.id.invite_avatar);
h.nickName = (TextView) convertView.findViewById(R.id.nearby_nickname);
h.checkBox = (CheckBox) convertView.findViewById(R.id.checkbox);
convertView.setTag(h);
} else {
h = (Holder) convertView.getTag();
}
UserBaseVo vo = friendList.get(position);
int nickColor = R.color.black;
h.nickName.setTextColor(mContext.getResources().getColor(nickColor));
h.nickName.setText(vo.getShowName());
NextApplication.displayCircleImage(h.mAvatar, vo.getThumb());
if (isMultipleChoice) {
// multi-select
if (vo.isCantChecked()) {
h.checkBox.setVisibility(View.VISIBLE);
h.checkBox.setButtonDrawable(R.drawable.checkbox_cant_selected);
} else {
h.checkBox.setVisibility(View.VISIBLE);
if (vo.isChecked()) {
h.checkBox.setButtonDrawable(R.drawable.checkbox_selected);
} else {
h.checkBox.setButtonDrawable(R.drawable.checkbox_unselected);
}
}
}
return convertView;
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class DiscussGroupAdapter method getView.
@Override
public View getView(int position, View convertView, ViewGroup parent) {
NearHolder holder;
if (convertView == null) {
holder = new NearHolder();
convertView = View.inflate(c, R.layout.discuss_group_item, null);
holder.nickName = (TextView) convertView.findViewById(R.id.group_nickname);
holder.avatar = (DiscussGroupImageView) convertView.findViewById(R.id.group_avatar);
convertView.setTag(holder);
} else {
holder = (NearHolder) convertView.getTag();
}
DiscussionGroupsVo group = sourceList.get(position);
holder.nickName.setText(group.getName());
StringBuffer sb = new StringBuffer();
for (int i = 0; i < group.getMembers().size(); i++) {
UserBaseVo member = group.getMembers().get(i);
if (i == group.getMembers().size() - 1) {
sb.append(member.getShowName());
} else {
sb.append(member.getShowName() + ",");
}
}
holder.avatar.setMember(group.getMembers());
return convertView;
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class DiscussGroupMemberListAdapter method getView.
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
Holder h;
if (convertView == null) {
h = new Holder();
convertView = View.inflate(mContext, R.layout.discuss_group_member_list_item, null);
h.mAvatar = (ImageView) convertView.findViewById(R.id.invite_avatar);
h.mNickname = (TextView) convertView.findViewById(R.id.invite_nickname);
convertView.setTag(h);
} else {
h = (Holder) convertView.getTag();
}
UserBaseVo uInfo = mList.get(position);
h.mNickname.setText(uInfo.getShowName());
NextApplication.displayCircleImage(h.mAvatar, uInfo.getThumb());
return convertView;
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class ContactSearchNickUI method onItemClick.
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
UserBaseVo baseVo = mAdapter.getItem(position);
Utils.intentFriendUserInfo(this, baseVo, false);
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class ContactSelectedUI method onItemClick.
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (position == 0) {
return;
}
final ChatMsg msg = mAdapter.getItem(position - 1);
// if(cantTrans(msg.getChatId())){
// return;
// }
List<UserBaseVo> members = msg.getMemberAvatarUserBaseList();
if (members == null || members.size() == 0) {
members = new ArrayList<>();
UserBaseVo vo = new UserBaseVo();
vo.setGender(msg.getGender() + "");
vo.setThumb(msg.getUserImage());
vo.setUsername(msg.getUsername());
members.add(vo);
}
showDialogFormat(msg.getChatId(), msg.getUsername(), msg.getUserImage(), msg.getGender() + "", msg.isGroup(), members);
}
Aggregations