title: how to select and de-select an item in RecyclerView? How to Highlight selected item only in recycler view?
body: <pre><code>@Override
      public void onBindViewHolder(final mainscreenspecializationadap.MyViewHolder holder, final int positionz) {
          this.position = holder.getAdapterPosition();
          final specializationpojo album = albumList.get(holder.getAdapterPosition());
          holder.txtspecs.setText(album.getSplztnname());
          holder.imgspecs.setImageResource(album.getIcon());
  
      holder.linelayout.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              row_index=positionz;
              album.setOpened(!album.isOpened());
              notifyDataSetChanged();
  
          }
      });
      if(positionz==row_index){
          holder.imageView.setBackground(mContext.getResources().getDrawable(R.drawable.white_circle_background));
          holder.txtspecs.setSelected(true);
          if (type==1)
          {
              onClick.onSelected(row_index,album.isOpened(),album.isClosed());
          }
          else if(type==2)
          {   onClick.onSpecialisationSelected(album.getSplzcode(),album.getCount());
          }
      }
      else
      {
          holder.txtspecs.setSelected(false);
          holder.imageView.setBackground(mContext.getResources().getDrawable(R.drawable.green_background));
      }
  
  }
  </code></pre>
  
  <ol>
  <li><p>I have a recycler view where I need to select only one item, so on that basis, I have to show a sub list items.</p></li>
  <li><p>Now the problem is when I unselect that item the below sub list items should be hidden.</p></li>
  <li><p>Please suggest me an answer I will be thankful for the answer. </p></li>
  </ol>