Search in sources :

Example 1 with CollectInfo

use of com.rideread.rideread.data.result.CollectInfo in project ride-read-android by Ride-Read.

the class CollectAdapter method onBindViewHolder.

@Override
public void onBindViewHolder(RecyclerView.ViewHolder tHolder, int position) {
    CollectHolder holder = (CollectHolder) tHolder;
    CollectInfo info = mList.get(position);
    ImgLoader.getInstance().displayImage(info.getFirstPicture(), holder.mImgCover);
    ImgLoader.getInstance().displayImage(info.getFaceUrl(), holder.mImgAvatar);
    holder.mTvName.setText(info.getUsername());
    //        holder.mTvContent.setText(info.get);
    holder.mTvTime.setText(DateUtils.getDateDayFormat(info.getCreateAt()));
    String relationType = "附近";
    switch(info.getType()) {
        case TYPE_RELATION_ATTENTION:
            relationType = "关注";
            break;
        case TYPE_RELATION_FANS:
            relationType = "附近";
            break;
        default:
            break;
    }
    holder.mTvRelation.setText(relationType);
//        holder.setIsRecyclable(false);
}
Also used : CollectInfo(com.rideread.rideread.data.result.CollectInfo)

Aggregations

CollectInfo (com.rideread.rideread.data.result.CollectInfo)1