title: RecyclerView with two viewtypes dont save view state on scroll
body: <p>I have a recyclerview with two viewtypes, one is a header and another one is my products, now, when I select lets say 5 times one product, I stackup that quantity in the item view, but when I scroll down and up, the view is restored without saving the view state, I know that is because recyclerview recycle the view and then just recreates it on scroll when onBindViewHolder() is hit, but I need to retain this views state and not to change.</p>
  
  <p>I dont have a checkbox in my selector that I could check if its selected or not, instead, I need to just keep the view as it is and not changing it on scroll</p>
  
  <p>I have tried implementing <code>getItemId</code> and <code>setHasStableIds(true)</code> but there is not working in my adapter</p>
  
  <pre><code> override fun getItemId(position: Int): Long {
          return super.getItemId(position)
      }
  
      override fun getItemViewType(position: Int): Int {
          return when {
              uiItems[position] is String -&gt; {
                  HEADER_VIEWTYPE
              }
              uiItems[position] is Product -&gt; {
                  PRODUCT_VIEWTYPE
              }
              else -&gt; {
                  -1
              }
          }
      }
  </code></pre>
  
  <p>How can I save the view state without changing the whole row when scrolling up and down in my recyclerview ?</p>