You can do this by custom bean class and implement Serializable
to that
so now when you create ArrayList<E>
of that class it is Serializable.
Example:
Class dataBean implements Serializable
{
public String name;
}
ArrayList<dataBean> dataBeanArrayList = new ArrayList();
So dataBeanArrayList
is now Serializable
and you can also pass this between Intent
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…