I have a class that contains an ArrayList<View>
. The Class works for me but i'm not able to save(to file locally) it yet.
Is there any possibility to to that?
I tried Serializable
and Externalizable
but always get a NotSerializableException
.
Setting to transient did not work either.
That is the code (I know Serializable
won't work):
public class ViewsData implements Serializable {
private ArrayList<View> viewsList = new ArrayList<View>();
public ViewsData () {
}
public ArrayList<View> getViewsList() {
return viewsList;
}
public void addToViewsList(View view) {
viewsList.add(view);
}
}
I'm very thankful for any hint about that.