I have the same codes with you. I don't know the type of MyList, but I
think you should new it before use it. like this:

ArrayList<String> aList = new ArrayList<String>();
aList.add(new String("hello1"));
intent.putExtra("MyList", aList );

it can work.

On Apr 7, 1:07 pm, "a...@lg" <l.prade...@gmail.com> wrote:
> Hi all,
> I have an ArrayList<MyList> aList in an activity. I would like to send
> this data to another activty.  Such that,
>
> ArrayList<MyList> aList;
>
> Intent intent = new Intent();
> intent.setClass(mainactivity.this, newActivity.class);
> intent.putExtra("MyList", aList );
> startActivity(intent);
>
> Will this work out..??
>
> On the receiving activity,
>
>  Intent i = getIntent();
> newList = (ArrayList<MyList>) i.getSerializableExtra("MyList");
>
> But this gets me no where.... ERROR..!!!
>
> Please help me..how to approach this problem...
>
> My intention is to share this List between activities...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to