app/src/main/java/yasirisortiz/com/simpletodo/ItemsAdapter.java
public void bind(String item) {

            tvItem.setText(item);
            tvItem.setOnClickListener(new View.OnClickListener(){
                @Override
                public void onClick(View v) {
                    clickListener.onItemClicked(getAdapterPosition());
                }
            });
            tvItem.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View view) {
                    // Notify the listener which position was long pressed
                    longClickListener.onItemLongClicked(getAdapterPosition());
                    return true;
                }
            });

        }
//        update the view inside of the view holder
update the view inside of the view holder
update the view inside of the view holder
public void bind(String item) {
            tvItem.setText(item);
            tvItem.setOnClickListener(new View.OnClickListener(){
                @Override
                public void onClick(View v) {
                    clickListener.onItemClicked(getAdapterPosition());
                }
            });
            tvItem.setOnLongClickListener(new View.OnLongClickListener() {
                @Override
                public boolean onLongClick(View view) {
                    longClickListener.onItemLongClicked(getAdapterPosition());
                    return true;
                }
            });
        }
public void bind ( String item ) { tvItem . setText ( item ) ; tvItem . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { clickListener . onItemClicked ( getAdapterPosition ( ) ) ; } } ) ; tvItem . setOnLongClickListener ( new View . OnLongClickListener ( ) { @ Override public boolean onLongClick ( View view ) { longClickListener . onItemLongClicked ( getAdapterPosition ( ) ) ; return true ; } } ) ; }
update the view inside of the view holder
update the view inside of the view holder
// Notify the listener which position was long pressed