title: Passing Parceleable Object to Fragment Type Mismatch
body: <p>I'm new to kotlin and trying to pass an object from my adapter to a fragment.  But I am getting a type mismatch in the companion object for <code>booklist</code>. It says <code>Required: Parceleable Found: List&lt;ResourcesList&gt;?</code></p>
  
  <p>I've also tried using <code>putParcelableArrayList</code> and <code>putParcelableArray</code> and <code>Serializable</code> but also with the same type mismatch.</p>
  
  <p>My data model looks like this:</p>
  
  <pre><code>@Parcelize
  class ResourcesList (val id: Int,
                       val name: String,
                       val content: Contents,
                       val tags: List&lt;Tags&gt;) : Parcelable
  
  @Parcelize
  class Contents       (val id: Int,
                       val producers: List&lt;Producers&gt;,
                       val categories: List&lt;Categories&gt;,
                       val isAvailable: Boolean): Parcelable
  @Parcelize
  class Producers     (val name: String,
                       val role: String): Parcelable
  @Parcelize
  class Categories    (val id: Int,
                       val name: String): Parcelable
  </code></pre>
  
  <p><strong>Fragment</strong></p>
  
  <pre><code>class SeeAllFragment: Fragment() {
  
      override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
          val view = inflater.inflate(R.layout.see_all_layout, container, false)
  
  
          val bookslist = arguments.getParceleable("bookslist")
  
          return view
      }
  
      companion object {
  
          fun newInstance(bookslist: List&lt;ResourcesList&gt;?): SeeAllFragment {
  
              val args = Bundle()
              args.putParcelable("bookslist", bookslist)
              val fragment = SeeAllFragment()
              fragment.arguments = args
              return fragment
          }
      }
  }
  </code></pre>