use of com.fastaccess.ui.adapter.viewholder.ReviewsViewHolder in project FastHub by k0shk0sh.
the class IssuesTimelineAdapter method onBindView.
@Override
protected void onBindView(BaseViewHolder holder, int position) {
TimelineModel model = getItem(position);
if (model.getType() == TimelineModel.HEADER) {
((IssueDetailsViewHolder) holder).bind(model);
} else if (model.getType() == TimelineModel.EVENT) {
((IssueTimelineViewHolder) holder).bind(model);
} else if (model.getType() == TimelineModel.COMMENT) {
((TimelineCommentsViewHolder) holder).bind(model);
} else if (model.getType() == TimelineModel.GROUP) {
((GroupedReviewsViewHolder) holder).bind(model);
} else if (model.getType() == TimelineModel.REVIEW) {
((ReviewsViewHolder) holder).bind(model);
} else if (model.getType() == TimelineModel.COMMIT_COMMENTS) {
((CommitThreadViewHolder) holder).bind(model);
} else if (model.getType() == TimelineModel.STATUS && model.getStatus() != null) {
((PullStatusViewHolder) holder).bind(model.getStatus());
}
if (model.getType() != TimelineModel.COMMENT) {
StaggeredGridLayoutManager.LayoutParams layoutParams = (StaggeredGridLayoutManager.LayoutParams) holder.itemView.getLayoutParams();
layoutParams.setFullSpan(true);
}
}
Aggregations