If anyone know how to show in recycler view adapter selected items only that means i need to show only selected item and remaining items i want remove or hide.

```
public class MoviesAdapter extends RecyclerView.Adapter<MoviesAdapter.MyViewHolder> {

   private List<Movie> moviesList;
   // Start with first item selected
   private int selectedItem = 0;
   int selectedPosition=-1;

  public class MyViewHolder extends RecyclerView.ViewHolder {
    public TextView title, year, genre;

    public MyViewHolder(View view) {
        super(view);
        title = (TextView) view.findViewById(R.id.title);
        genre = (TextView) view.findViewById(R.id.genre);
        year = (TextView) view.findViewById(R.id.year);

   public MoviesAdapter(List<Movie> moviesList) {
      this.moviesList = moviesList;
   }

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

      return new MyViewHolder(itemView);
   }

   @Override
   public void onBindViewHolder(final MyViewHolder holder, final int position) {
       Movie movie = moviesList.get(position);
       holder.title.setText(movie.getTitle());
       holder.genre.setText(movie.getGenre());
       holder.year.setText(movie.getYear());

       if(selectedPosition==position)
          holder.itemView.setBackgroundColor(Color.parseColor("#50000000"));
       else
          holder.itemView.setBackgroundColor(Color.parseColor("#ffffff"));

      holder.itemView.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
          selectedPosition=position;
            notifyItemRangeRemoved(position,moviesList);

        }
    });
  }
  @Override
  public int getItemCount() {
     return moviesList.size();
  }
}

```