title: Why can we not attach same LayoutManager Object with multiple RecyclerView in Android?
body: <p>Getting following error:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: LayoutManager
    android.support.v7.widget.LinearLayoutManager@f8f0a is already
    attached to a RecyclerView: android.support.v7.widget.RecyclerView</p>
  </blockquote>
  
  <p>following is the code(Kotlin Code Snip)</p>
  
  <pre><code>val layoutmanager = LinearLayoutManager(context)
      layoutmanager.orientation = LinearLayoutManager.HORIZONTAL
  
      val parentView = view!!.findViewById&lt;View&gt;(R.id.solid_fill_picker)
      val recyclerView1 = parentView.findViewById&lt;RecyclerView&gt;(R.id.theme_color_palette1)
  
      recyclerView1.layoutManager = layoutmanager
  val layoutmanager = LinearLayoutManager(context)
      layoutmanager.orientation = LinearLayoutManager.HORIZONTAL
  
  
      val recyclerView2 = parentView.findViewById&lt;RecyclerView&gt;(R.id.theme_color_palette1)
  
      recyclerView2.layoutManager = layoutmanager
  </code></pre>