You could condition the possibility of AttributeType.DIFFICULTY existing when starting the itemViewHolder function and then do a difficultyView.visibility = View.INVISIBLE