use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class MsgAddContactListUI method onItemClick.
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
UserBaseVo info = new UserBaseVo();
info.setLocalId(mList.get(position).getUserId());
info.setUsername(mList.get(position).getUsername());
info.setThumb(mList.get(position).getUserImage());
Utils.intentFriendUserInfo(this, info, false);
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class GroupQuickMarkUI method setDiscussAvatar.
/**
* set group avatar
*/
private void setDiscussAvatar() {
mGroupAvatar.setVisibility(View.VISIBLE);
String[] split = avatarUrl.split("#");
UserBaseVo vo;
for (int i = 0; i < split.length; i++) {
vo = new UserBaseVo();
String[] splitVo = split[i].split("___");
String gender = "2";
try {
gender = splitVo[1];
} catch (Exception e) {
e.printStackTrace();
}
String avatar = "";
try {
avatar = splitVo[0];
} catch (Exception e) {
e.printStackTrace();
}
vo.setGender(gender);
vo.setThumb(avatar);
avatarList.add(vo);
}
mGroupAvatar.setMember(avatarList);
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class Utils method gotoGroupChat.
/**
* into the group chat
* @ param cid group chat id
* @ param member group of members
*/
public static void gotoGroupChat(Context context, boolean hasJoined, String groupName, String cid, List<UserBaseVo> member) {
StringBuilder url = new StringBuilder();
StringBuilder username = new StringBuilder();
try {
if (!hasJoined) {
url.append(NextApplication.myInfo.getThumb()).append("___").append(NextApplication.myInfo.getGender()).append("#");
}
for (UserBaseVo vo : member) {
url.append(vo.getThumb()).append("___").append(vo.getGender()).append("#");
}
url.deleteCharAt(url.lastIndexOf("#"));
if (TextUtils.isEmpty(groupName)) {
username.append(NextApplication.myInfo.getUserName()).append("、");
for (UserBaseVo vo : member) {
username.append(vo.getUserName()).append("、");
}
username.deleteCharAt(username.lastIndexOf("、"));
}
} catch (Exception e) {
e.printStackTrace();
}
Utils.intentChattingUI(context, "group-" + cid, url.toString(), TextUtils.isEmpty(groupName) ? username.toString() : groupName, "1", 0, true, false, false, 0, true);
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class FriendInfoUI method loadData.
/**
* Loading the page information
*/
private void loadData() {
if (info != null) {
UserBaseVo vo = FinalUserDataBase.getInstance().getUserBaseVoByUid(info.getLocalId());
if (vo != null) {
info.setFriendLog(1);
} else if (TextUtils.equals(NextApplication.myInfo.getLocalId(), info.getLocalId())) {
info.setFriendLog(-1);
}
setTitle(info.getUsername());
if (!info.getThumb().startsWith("http:")) {
friendImg.setText(info.getUsername(), friendImg, "file://".concat(info.getThumb()));
} else {
friendImg.setText(info.getUsername(), friendImg, info.getThumb());
}
if (TextUtils.isEmpty(info.getNote())) {
friendNote.setVisibility(View.INVISIBLE);
} else {
friendNote.setVisibility(View.VISIBLE);
friendNote.setText(info.getNote());
}
if (TextUtils.isEmpty(info.getMid())) {
friendMid.setVisibility(View.INVISIBLE);
} else {
friendMid.setVisibility(View.VISIBLE);
friendMid.setText(getString(R.string.mid_user, info.getMid()));
}
friendSignature.setText(info.getSightml());
if (info.getFriendLog() == -1) {
app_right.setVisibility(View.GONE);
addFriends.setVisibility(View.GONE);
sendMsg.setVisibility(View.GONE);
} else if (info.getFriendLog() == 1) {
addFriends.setText(getString(R.string.contact_default));
addFriends.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.icon_has_friend), null, null, null);
addFriends.setEnabled(false);
if (Utils.isConnectNet(FriendInfoUI.this)) {
app_right.setVisibility(View.VISIBLE);
} else {
app_right.setVisibility(View.GONE);
}
} else {
addFriends.setEnabled(true);
addFriends.setText(getString(R.string.add_friends));
addFriends.setTextColor(getResources().getColor(R.color.black));
addFriends.setCompoundDrawablesWithIntrinsicBounds(getResources().getDrawable(R.drawable.icon_info_add_friend), null, null, null);
if (Utils.isConnectNet(FriendInfoUI.this)) {
app_right.setVisibility(View.VISIBLE);
} else {
app_right.setVisibility(View.GONE);
}
}
}
}
use of com.lingtuan.firefly.vo.UserBaseVo in project SmartMesh_Android by SmartMeshFoundation.
the class ChattingSetUI method onClick.
@Override
public void onClick(View v) {
super.onClick(v);
switch(v.getId()) {
case // The personal data
R.id.chatUserInfo:
UserBaseVo info = new UserBaseVo();
info.setLocalId(uid);
info.setUsername(userName);
info.setGender(gender);
info.setThumb(avatarUrl);
Utils.intentFriendUserInfo(this, info, false);
break;
case // Chat to report
R.id.chatInfoReport:
Intent report = new Intent(ChattingSetUI.this, ChatReportReasonUI.class);
report.putExtra("buid", uid);
report.putExtra("avatarurl", avatarUrl);
report.putExtra("username", userName);
report.putExtra("gender", gender);
startActivityForResult(report, CHOICE_REASON_REQUEST_CODE);
Utils.openNewActivityAnim(ChattingSetUI.this, false);
break;
default:
break;
}
}
Aggregations