Cannot cast from ArrayList<Parcelable> to ArrayList<ClSprite>

Viewed 9886

In a piece of code I've written, I have this line:

         AllSprites = (ArrayList<ClSprite>) savedInstanceState.getParcelableArrayList("AllSprites");

I'm getting an error about an invalid cast from an ArrayList<Parcelable> to ArrayList<ClSprite>. Why isn't this legal?

4 Answers
Related