RecyclerView item selected and how to disable Touch events
<p>There are all kinds of materials on how to do a simple <code>RecyclerView</code> click event handler but I can't find help with this basic desired functionality. I want to be able to <code>long tap</code> on an item so that it becomes selected (see how I change elevation and color to make it appear selected). Then, if in my <code>Fragment</code> I'd like to remove one item from the <code>RecyclerView</code> based on a <code>Toolbar</code> delete button clicked for example, how would I do that if Google suggest that we shouldn't be keeping an instance of the position from the adapter outside of the class.</p>

<p>I implemented a <code>BottomSheet</code> from the 23.2.0 support library, it appears above my <code>RecyclerView</code> but clicks go through and it's like I'm controlling the RecyclerView itself but instead I also have a <code>BottomSheet</code> on top. How can I really 'disable' it?</p>

<p><strong>I've tried</strong>: using an <a href="https://stackoverflow.com/questions/27927830/disable-click-on-recyclerview-inside-a-swiperefreshlayout">interface</a>, setting <code>clickable=true</code> to top layout View.</p>

<p>My <code>RecyclerAdapter</code>:</p>

<pre><code>public class RecyclerAdapter extends RecyclerView.Adapter&lt;RecyclerAdapter.EventViewHolder&gt; {
private List&lt;Event&gt; eventsList;
private int selected_position = -1;
private RecyclerView recyclerView;



Typeface font;
Typeface fontBold;

public RecyclerAdapter(List&lt;Event&gt; eventsList, RecyclerView recyclerView) {
    this.eventsList = eventsList;
    this.recyclerView = recyclerView;
}

@Override
public RecyclerAdapter.EventViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View itemView = LayoutInflater.
            from(parent.getContext()).
            inflate(R.layout.events_cardview, parent, false);

    font = Typeface.createFromAsset(itemView.getContext().getAssets(), "ubuntu-l.ttf");
    fontBold = Typeface.createFromAsset(itemView.getContext().getAssets(), "ubuntu-b.ttf");

    return new EventViewHolder(itemView);
}


@Override
public void onBindViewHolder(RecyclerAdapter.EventViewHolder eventViewHolder,final int position) {


    if(selected_position == position){
        // Here I am just highlighting the background
        eventViewHolder.cardView.setCardBackgroundColor(ContextCompat.getColor(MyApplication.getAppContext(), R.color.tealfifty));
        if (Build.VERSION.SDK_INT &gt;= 21) {
            eventViewHolder.itemView.setElevation(10f);
            eventViewHolder.itemView.setTranslationZ(10f);
        }
    }else{
        if (Build.VERSION.SDK_INT &gt;= 21) {
            eventViewHolder.itemView.setElevation(2f);
            eventViewHolder.itemView.setTranslationZ(2f);
        }
        eventViewHolder.cardView.setCardBackgroundColor(ContextCompat.getColor(MyApplication.getAppContext(), R.color.white));
    }

    eventViewHolder.itemView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            RecyclerView.LayoutManager lm = recyclerView.getLayoutManager();

            // Updating old as well as new positions
            notifyItemChanged(selected_position);
            selected_position = position;
            notifyItemChanged(selected_position);
            lm.scrollToPosition(selected_position);
        }
    });

    Event event = eventsList.get(position);
    eventViewHolder.itemView.setTag(R.integer.EVENT_OBJECT_TAG, event);
....
</code></pre>