How do I pass an ArrayList of arrays to an intent in Android? I know you can pass an ArrayList<String>, but is it possible to pass an ArrayList<String[]>?
How do I pass an ArrayList of arrays to an intent in Android? I
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s possible, but you need to pass it as a
Serializableand you’ll need to cast the result when you extract the extra. SinceArrayListimplementsSerializableandString[]is inherently serializable, the code is straightforward. To pass it:To retrieve it:
You’ll have to suppress (or live with) the unchecked conversion warning.