Hi
I need help in finding a way to store
ArrayList>
in an Bunble object so that i can retrieve t
first you must have a static holder:
private static class Holder{
private ListimageList = new ArrayList();
}
second, when orientation start, you must return the object you want to retrieve after the orientation:
@Override
public Object onRetainNonConfigurationInstance() {
return holder;
}
at last, when you create the 'new' activity must call getLastNonConfigurationInstance(). ANdroid will return your holder with your List.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
holder = (Holder) getLastNonConfigurationInstance();
}
you can find a more extensive explanation here: Faster Screen Orientation.
cheers