I\'ve implemented my class with serializable, but it still didn\'t work.
This is my class:
package com.ursabyte.thumbnail;
import java.io.Serializab
I extended ρяσѕρєя K's answer to make the code full and workable. So, when you finish filling your 'all_thumbs' list, you should put its content one by one into the bundle and then into the intent:
Bundle bundle = new Bundle();
for (int i = 0; i
In order to get the extras from the intent, you need:
Bundle bundle = new Bundle();
List thumbnailObjects = new ArrayList();
// collect your Thumbnail objects
for (String key : bundle.keySet()) {
thumbnailObjects.add((Thumbnail) bundle.getSerializable(key));
}
// for example, in order to get a value of the 3-rd object you need to:
String label = thumbnailObjects.get(2).get_label();
Advantage of Serializable is its simplicity. However, I would recommend you to consider using Parcelable method when you need transfer many data, because Parcelable is specifically designed for Android and it is more efficient than Serializable. You can create Parcelable class using: