use of com.rideread.rideread.common.base.BaseActivity in project ride-read-android by Ride-Read.
the class CommentsAdapter method getItemView.
@Override
public View getItemView(int position, View convertView, ViewHolder viewHolder, ViewGroup viewGroup) {
SimpleDraweeView sdv_thumb_avatar = viewHolder.getView(R.id.sdv_thumb_avatar);
TextView tv_thumb_username = viewHolder.getView(R.id.tv_thumb_username);
TextView tv_thumb_time = viewHolder.getView(R.id.tv_thumb_time);
TextView tv_thumb_content = viewHolder.getView(R.id.tv_thumb_content);
Comment comment = getItem(position);
ImgLoader.getInstance().displayImage(comment.getFaceUrl(), sdv_thumb_avatar);
tv_thumb_username.setText(comment.getUsername());
tv_thumb_time.setText(TimeUtils.getFriendlyTimeSpanByNow(comment.getCreatedAt()));
tv_thumb_content.setText(comment.getMsg());
sdv_thumb_avatar.setOnClickListener(v -> {
Bundle bundle = new Bundle();
bundle.putInt(UserMomentsActivity.SELECTED_UID, comment.getUid());
bundle.putString(UserMomentsActivity.SELECTED_USERNAME, comment.getUsername());
((BaseActivity) mContext).gotoActivity(UserMomentsActivity.class, bundle);
});
return convertView;
}
Aggregations