title: How to implement single selection in RecyclerView?
body: <p>I can change properties of selected item in RecyclerView but I want to remove selection for older selections. </p>
  
  <p>Here is how I create RecyclerView : </p>
  
  <pre><code>fragmentViewPagerAdapter.addFragmentView((arg1, arg2, arg3) -&gt; {
          View view = arg1.inflate(R.layout.recyclerview_layout, arg2, false);
          RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recyclerView);
          selectDateRecyclerViewAdapter = new SelectDateRecyclerViewAdapter(dayList,this,(v,position) -&gt;
          {
              AppCompatButton appCompatButton = (AppCompatButton)v.findViewById(R.id.selectHourButton);
              AppCompatImageView appCompatImageView = (AppCompatImageView)v.findViewById(R.id.calendarDot);
              highlightButton(appCompatButton,appCompatImageView);
          });
          recyclerView.setHasFixedSize(false);
          recyclerView.addItemDecoration(selectDateRecyclerViewAdapter. new CalendarItemDecoration(10,dayList.size()));
          GridLayoutManager gridLayoutManager = new GridLayoutManager(getApplicationContext(),4,GridLayoutManager.VERTICAL,false);
          recyclerView.setLayoutManager(gridLayoutManager);
          recyclerView.setAdapter(selectDateRecyclerViewAdapter);
          selectDateRecyclerViewAdapter.notifyDataSetChanged();
          return view;
      });
  </code></pre>
  
  <p>highlightButton method changes background of Button etc. </p>
  
  <p>Thanks. </p>