我有ArrayList<DataChannels> dataChannelsArrayList = new ArrayList<>()
和DataChannels.java
:
public class DataChannels {
private DataRequestStatus dataRequestStatus;
private ArrayList<Channel> channelArrayList;
...getters-setters...
}
和Channel.java
:
class Channel{
private String id;
private String taxonomy_name;
private String ch_id;
private String lang;
private String name;
private String __v;
private String sort;
private boolean active;
...getters-setters...
}
DataRequestStatus.java
:
public class DataRequestStatus {
private String status;
private String error;
...getters-setters...
}
我无法理解如何将ArrayList<DataChannels> dataChannelsArrayList
传递给Fragment
来自Activity
。
我尝试过Serializeble
界面。不工作。并且想尝试Parcelable
但不知道如何正确实施writeToParcel(Parcel out, int flags)
。
请帮帮我。它真的很混乱。