starting an activity - passing a vector object to it

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

starting an activity - passing a vector object to it

Postby sommeralex » Sun Feb 24, 2008 12:51 pm

Hello again..

I would like to start an activity, its the iconified Text List from PlusMinus - but, before i start it, i want to put a (dynamic) Vector to it, which then provides the content for my adapter..

how can i do this??! i think i have to work with intents, right?

thx..
alex
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Postby plusminus » Sun Feb 24, 2008 10:18 pm

Hello sommeralex,

let me quote the SDK-Documentation:
Object android.content.Intent.getExtra(String name)

public Object getExtra(String name)
Retrieve extended data from the intent.
Parameters
name The name of the desired item.

Returns
the value of an item that previously added with putExtra() or null if none was found.
See Also
getExtra(String, Object)
putExtra(String, Object)

You see that it refers to the method "putExtra(String, Object)" *cheer*.

Don't start searching, it does not exist :?

You'll have to use so called Parcelables (Interface), to write complex objects.
Like described here: http://www.anddev.org/viewtopic.php?p=3875#3875

BUT: Parcelable currently do not work with the Eclipse plugin :) (untested but foudn in the SDK-documentation)
Maybe it changed with now works with m5 :roll:

Regards,
plusminus
Last edited by plusminus on Mon Feb 25, 2008 1:44 am, edited 1 time in total.
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Postby sommeralex » Mon Feb 25, 2008 1:34 am

thank you again..
sommeralex
Experienced Developer
Experienced Developer
 
Posts: 95
Joined: Sun Jan 20, 2008 3:12 am
Location: Vienna

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 21 guests