0

I have this arrayList: public ArrayList<ArrayList<String>> ejemplo=new ArrayList<>(); and I´d like to send it to another activity in my project but I don´t know how. I have read that there is: intent.putStringArrayListExtra(); but it is to send an arrayList and in my case if I use that it says that it´s expecting an arrayList<String> and I´m providing an ArrayList<ArrayList<String>>. Any idea? Thank you.

louisMay
  • 23
  • 3

1 Answers1

0

You can convert your arrayList of arrayLists into jason, then pass the string to the other activity. Then in the activity, decode the json into your object. Check out the Gson library from google.

Kristy Welsh
  • 7,828
  • 12
  • 64
  • 106