title: Making data class with ArrayList inside Parcelable
body: <p>I added Parcelable implementation for my class and get this code:</p>
  
  <pre><code>data class Category (val name:String, var factors:ArrayList&lt;String&gt;):Parcelable {
      constructor(parcel: Parcel) : this(
              parcel.readString(),
              TODO("factors")) {
      }
  
      override fun writeToParcel(parcel: Parcel, flags: Int) {
          parcel.writeString(name)
      }
  
      override fun describeContents(): Int {
          return 0
      }
  
      companion object CREATOR : Parcelable.Creator&lt;Category&gt; {
          override fun createFromParcel(parcel: Parcel): Category {
              return Category(parcel)
          }
  
          override fun newArray(size: Int): Array&lt;Category?&gt; {
              return arrayOfNulls(size)
          }
      }
  }
  </code></pre>
  
  <p>As far as I understand I should write method for reading data from ArrayList. I've tried to use </p>
  
  <pre><code>parcel.readArrayList()
  </code></pre>
  
  <p>but can not understand, how to insert String as ClassLoader. Please help me to understand, how to make this object Parcelable.</p>