Given: RecyclerView with elements.
Necessary: To make it so that when adding new elements to the list, the last element that is there has not been changed and when you click on it, a new activation is opened
@Override public void onBindViewHolder(CategoryViewHolder categoryViewHolder, int i) { if (i < getItemCount()-1) { // тут не делать ничего? } else { // последний элемент Category lastCategory = new Category("lasItem", R.drawable.ic_favorites); categories.add(lastCategory); } categoryViewHolder.bind(categories.get(i), listener); categoryViewHolder.categoryName.setText(categories.get(i).name); categoryViewHolder.categoryPhoto.setImageResource(categories.get(i).photoId); } 
