if (position != count-1) { viewHolder.imgLineEnd.setVisibility(View.GONE); } else { viewHolder.imgLineEnd.setVisibility(View.VISIBLE); }