[mono-android] persistent putextra etc

john Murray john at murray.uk.com
Wed Mar 23 06:10:47 EDT 2011


Sorry to ask for help once again on this 

I have mastered activities and putting and getting extras  but only with
simple data forms such as strings

I've struggled a bit with arrays but as long as they are simple (arraylists
seemed t be a 'no no' when creating a bundle to pass t put extra) 

 

What I really want to do is pass an instance of a data class - just a rather
big form with a few one-to-many fields of data 

e.g.  vehicle details-journey details  - several pax 

 

so I have a class called vehicle which contains and collects the data from
forms which are actually different activities 

I want the instance of this class to be available in all activities 

 

I cannot figure out how to pass the instance of the class using bundle and
putextras 

It seems to be something to do with parcelable data - ie. My   vehicle class
needs to be parcelable 

I've found something on this but it might as well be Fermatts last theorem

 

1)      Am I right about the parcelable stuff

2)      How do I make my class parcelable

3)      Is there an easier way? - cant figure how to make a static visible
in all activities - 

4)      My fall back position is to pass a load of simple arrays or to
serialize to storage between activities 

 

 

 

Thanks in advance 

John Murray

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/mailman/private/monodroid/attachments/20110323/4a9b2e7b/attachment-0001.html 


More information about the Monodroid mailing list