title: Read and write an ArrayList of ArrayLists containing Parcelable Objects to pass in an Intent
body: <p>I just changed all serializable classes in my project to parcelable classes.
  Everything is working fine, except for that one class which is made of an ArrayList containing another ArrayList. I already debugged.
  There is no error when writing this ArrayList. But I get an error while reading it.</p>
  
  <p>This is the class where the error happens:</p>
  
  <pre><code>public class Timetable implements Parcelable
  {
  private int actLap = 0;
  private ArrayList&lt;Lap&gt; timetable;
  private ArrayList&lt;Location&gt; loggedLocations;
  private Date startTime; ...
  ...
  public void writeToParcel(Parcel out, int flags)
  {
      out.writeInt(actLap);
      out.writeTypedList(timetable); //no error here
      out.writeTypedList(loggedLocations); ...
  ...
      private Timetable(Parcel in)
  {
      actLap          = in.readInt();
      in.readTypedList(timetable, Lap.CREATOR); //error after this line
      in.readTypedList(loggedLocations, Location.CREATOR);
      startTime       = (Date)in.readSerializable();
      bestLap         = in.readParcelable(Lap.class.getClassLoader());
      track           = in.readParcelable(Track.class.getClassLoader());
      description     = in.readString();
  }
  </code></pre>
  
  <p>Here are the other classes:</p>
  
  <pre><code>public class Lap implements Parcelable
  {   
  private ArrayList&lt;Time&gt; sectorTimes = new ArrayList&lt;Time&gt;();
  private Time laptime; ...
  ...
  public void writeToParcel(Parcel out, int flags)
  {
      out.writeTypedList(sectorTimes);
      out.writeParcelable(laptime,flags);
  }
  
  public static final Parcelable.Creator&lt;Lap&gt; CREATOR = new Parcelable.Creator&lt;Lap&gt;()
  {
      public Lap createFromParcel(Parcel in)
      {
          return new Lap(in);
      }
  
      public Lap[] newArray(int size)
      {
          return new Lap[size];
      }
  };
  
  private Lap(Parcel in)
  {
      in.readTypedList(sectorTimes, Time.CREATOR);
      laptime     = in.readParcelable(Time.class.getClassLoader());
  }
  </code></pre>
  
  <p>And this class:</p>
  
  <pre><code>public class Time implements Parcelable
  {
  private long timeLong;
  private String timeString;...
  ...
  public void writeToParcel(Parcel out, int flags)
  {
      out.writeLong(timeLong);
      out.writeString(timeString);
  }
  
  public static final Parcelable.Creator&lt;Time&gt; CREATOR = new Parcelable.Creator&lt;Time&gt;()
  {
      public Time createFromParcel(Parcel in)
      {
          return new Time(in);
      }
  
      public Time[] newArray(int size)
      {
          return new Time[size];
      }
  };
  
  private Time(Parcel in)
  {
      timeLong = in.readLong();
      timeString = in.readString();
  }
  </code></pre>
  
  <p>Like I already said, everything works fine (there are more Parcelable classes which I pass with intents (including a single ArrayList) and which I save in files).
  So can you guys help me to write and read that double ArrayList?
  Thanks in advance</p>