Send List to new activity

Im trying to send a List to next activity the list

List mGF = new ArrayList();

i cant figur it out... i have read and try for days...

Intent i = new Intent(mContext, ViewImages.class); i.put....? (mGF);

How do i send and how do i get it as mGF in the next activity

hope you understand


Haven't tried this but thought the questions was interesting.. so I went searching

In the Intent documentation there are quite a few different ArrayList type put??extra methods. Depending on the type of your ArrayList you should use one of them.


ArrayList<String> mGF = new ArrayList<String>();

Intent i = new Intent(mContext, ViewImages.class);
i.putStringArrayListExtra("package prefix"."whateverYouWannaNameIt",mGF);

Then you use getStringArrayListExtra("package prefix"."whateverYouWannaNameIt")

I fell over this when I was looking around for some solutions for your problem that might help.

Need Your Help

PHP: file_get_contents() gives me "Name or service not known"

php nginx dns file-get-contents

Okay, this question has been asked plenty of times around the internet, but I haven't found any solution that fixes the problem in my case.