I am storing my data into arraylist of one class and sending that arraylist data to other class. But the values of the arraylist are not coming to the other class. I have given like
page1.java
static ArrayList<ArrayList<String>> stringList1;
page2.java
static List<ArrayList<String>> mystringList1 = new ArrayList<ArrayList<String>>();
mystringList1 = page1.stringList1;
Dont know where I am going wrong..but tried a lot to send the data….Please help me regarding this…
Make it
publicstaticand you will be able to pass yourArrayListto Another Class. But, better way would be to useSerializableorParcelableto pass it.UPDATE
Application Class From the Docs.
Other Option is you can create a class that extends
Applicationand you can use agettersetterfor theArrayListthere in theApplicationclass.ApplicationClass is available to your whole Application and you can get the values everywhere using the Application Context.