private boolean hasUserExist(int uid) { AddrlistNewData item = QiuKnowUserFacade.queryQiukonwUserInfo(mUserDetailInfo.getUser_info().getUid() + ""); if (item != null) { return AddrlistNewConstant.StatusType.Status_ToAgree == item.getStatus() ? true : false; } return false; }
private void initBasicUserInfo(UserDetailInfo t) { if (t.getUser_info() == null) { return; } if (t.isIs_friend() == 1) { mRelplyButtonBlock.setVisibility(View.GONE); } mNickName.setText(t.getUser_info().getNick_name()); String signature = t.getUser_info().getDescription(); if (signature == null || signature.equalsIgnoreCase("")) { mSignature.setVisibility(View.GONE); } else { mSignature.setText(getString(R.string.detail_user_nickname, signature)); } mCajianId.setText(getString(R.string.detail_user_uid, t.getUser_info().getUid())); updateImage(t.getUser_info().getHeader_logo()); }
private void onClickQiuknow() { CreateKnowFacade.getInstance().unRegisterListener(this); // check whether or not the user is the same as me String uid = UserInfo.getInstance().getUid(); if (uid.equalsIgnoreCase(mUid)) { ToastFactory.showMsgForShortTime(this, R.string.addrlist_new_same); return; } Intent intent = new Intent(this, QiuKnowMessageActivity.class); intent.putExtra("uid", mUid); intent.putExtra("name", UserInfo.getInstance().getUserName()); intent.putExtra("targetName", mUserDetailInfo.getUser_info().getNick_name()); startActivityForResult(intent, 1); }
private void initRequestInfo(UserDetailInfo t) { List<RequestInfo> infos = t.getRequest_info(); if (infos == null) { return; } Collections.reverse(infos); if (infos != null && !infos.isEmpty()) { if (mAdapter == null) { mAdapter = new ReplyGridViewAdapter(infos, t.getUser_info().getNick_name()); mReplyGridView.setAdapter(mAdapter); } else { mAdapter.addRequestInfos(infos); } mReplyBlock.setVisibility(View.VISIBLE); } else { mReplyBlock.setVisibility(View.GONE); } }
private void iniBottomBlockImage(ImageView imageView) { if (mUserDetailInfo == null) { return; } // judge the type boolean isFriend = mUserDetailInfo.isIs_friend() == 1 ? true : false; if (!isFriend) { if (hasUserExist(mUserDetailInfo.getUser_info().getUid())) { imageView.setImageResource(R.drawable.detail_qiuknow_agree_bg); imageView.setTag(TypeAgree); } else { imageView.setImageResource(R.drawable.detail_qiuknow_image_bg); imageView.setTag(TypeTo); } } else { imageView.setImageResource(R.drawable.detail_qiuknow_chat_bg); imageView.setTag(TypeChat); } }