use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class ObjectToStringUtility method toString.
public static String toString(DMUserBean dm) {
UserBean userBean = dm.getUser();
String username = (userBean != null ? userBean.getScreen_name() : "user is null");
return String.format("%s @%s:%s", TimeUtility.getListTime(dm.getMills()), username, dm.getText());
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class ObjectToStringUtility method toString.
public static String toString(CommentBean comment) {
UserBean userBean = comment.getUser();
String username = (userBean != null ? userBean.getScreen_name() : "user is null");
return String.format("%s @%s:%s", TimeUtility.getListTime(comment.getMills()), username, comment.getText());
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class ObjectToStringUtility method toString.
public static String toString(MessageBean msg) {
UserBean userBean = msg.getUser();
String username = (userBean != null ? userBean.getScreen_name() : "user is null");
return String.format("%s @%s:%s", TimeUtility.getListTime(msg.getMills()), username, msg.getText());
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class BrowserWeiboMsgCommentAndRepostAdapter method bindRepostData.
private void bindRepostData(ViewHolder holder, int position) {
Drawable drawable = bg.get(holder);
if (drawable != null) {
holder.listview_root.setBackgroundDrawable(drawable);
} else {
drawable = holder.listview_root.getBackground();
bg.put(holder, drawable);
}
if (listView.getCheckedItemPosition() == position + listView.getHeaderViewsCount()) {
holder.listview_root.setBackgroundColor(checkedBG);
}
final MessageBean msg = (MessageBean) getItem(position);
UserBean user = msg.getUser();
if (user != null) {
holder.username.setVisibility(View.VISIBLE);
if (!TextUtils.isEmpty(user.getRemark())) {
holder.username.setText(new StringBuilder(user.getScreen_name()).append("(").append(user.getRemark()).append(")").toString());
} else {
holder.username.setText(user.getScreen_name());
}
if (!SettingUtility.getEnableCommentRepostListAvatar()) {
holder.avatar.setLayoutParams(new RelativeLayout.LayoutParams(0, 0));
} else {
buildAvatar(holder.avatar, position, user);
}
} else {
holder.username.setVisibility(View.INVISIBLE);
holder.avatar.setVisibility(View.INVISIBLE);
}
if (!TextUtils.isEmpty(msg.getListViewSpannableString())) {
holder.content.setText(msg.getListViewSpannableString());
} else {
TimeLineUtility.addJustHighLightLinks(msg);
holder.content.setText(msg.getListViewSpannableString());
}
holder.avatar.checkVerified(user);
holder.time.setTime(msg.getMills());
holder.reply.setVisibility(View.GONE);
}
use of org.qii.weiciyuan.bean.UserBean in project weiciyuan by qii.
the class DMConversationAdapter method bindViewData.
protected void bindViewData(DMViewHolder holder, int position) {
final DMBean msg = bean.get(position);
UserBean user = msg.getUser();
if (user != null) {
buildAvatar(holder.avatar, position, user);
} else {
holder.avatar.setVisibility(View.INVISIBLE);
}
if (!TextUtils.isEmpty(msg.getListViewSpannableString())) {
holder.content.setText(msg.getListViewSpannableString());
} else {
TimeLineUtility.addJustHighLightLinks(msg);
holder.content.setText(msg.getListViewSpannableString());
}
String time = msg.getListviewItemShowTime();
if (!holder.time.getText().toString().equals(time)) {
holder.time.setText(time);
}
holder.time.setTag(msg.getId());
}
Aggregations