Passing ArrayList between Activities

Put your problem here if it does not fit any of the other categories.

Passing ArrayList between Activities

Postby bavarol » Wed Jul 23, 2008 2:27 pm

Hi,
How could I pass an ArrayList Object as parameter between activities?
I have tried as serializable (ArrayList implements serializable) but I always get an Exception.

Thx in advance
bavarol
Experienced Developer
Experienced Developer
 
Posts: 52
Joined: Mon Dec 10, 2007 9:19 pm

Top

i also want to know

Postby myandroid » Thu Aug 14, 2008 2:30 am

i you got it ,please tell me by the way,thanks
Do my best to do everything
User avatar
myandroid
Freshman
Freshman
 
Posts: 3
Joined: Tue Jul 08, 2008 6:32 am
Location: china

Postby chris » Thu Aug 14, 2008 10:17 am

Hi ,

The recommended way by the google eng. is to use a static Hashmap by putting the objects you want to pass from an activity to another into this Hashmap and to pass the key of the object into the intent.

I'm not too found of static objects as they can be garbage collected in case of severe need for memory but this is the answer we had.

Chris
chris
Junior Developer
Junior Developer
 
Posts: 18
Joined: Sat Feb 02, 2008 4:39 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests