@Override public void bindView(RecyclerView.ViewHolder holder) { Context ctx = holder.itemView.getContext(); //get our viewHolder ViewHolder viewHolder = (ViewHolder) holder; //bind the basic view parts bindViewHelper((BaseViewHolder) holder); //set the text for the badge or hide boolean badgeVisible = StringHolder.applyToOrHide(mBadge, viewHolder.badge); //style the badge if it is visible if (badgeVisible) { mBadgeStyle.style(viewHolder.badge, getTextColorStateList(getColor(ctx), getSelectedTextColor(ctx))); viewHolder.badgeContainer.setVisibility(View.VISIBLE); } else { viewHolder.badgeContainer.setVisibility(View.GONE); } //define the typeface for our textViews if (getTypeface() != null) { viewHolder.badge.setTypeface(getTypeface()); } //call the onPostBindView method to trigger post bind view actions (like the listener to modify the item if required) onPostBindView(this, holder.itemView); }