Reputation: 109
In my project, I have to write and read ArrayList<String>
to parcel, I tried with writeList and writeStringList but no use, I am getting exceptions while reading the lists.
Could any one help me in this?
Thanks In advance.
Upvotes: 7
Views: 7298
Reputation: 131
use this to write:
bundle.putStringArrayList(KEY, stringArrayList);
and this to read:
ArrayList<String> stringArrayList = bundle.getStringArrayList(KEY);
Upvotes: 1
Reputation: 1940
By @JeremyRoman: writeStringList
, readStringList
and createStringArrayList
all exist on Parcel
since API 1.
Upvotes: 8