What if I have my own custom class, e.g., "SessionState" that I want to pass back and forth? Thanks, Joe
On Mon, Feb 23, 2009 at 6:35 AM, Odessa Silverberg < [email protected]> wrote: > > Basically by adding the data you want to pass as extras. > > If you need to pass simple values, like an integer you could do it by > > int myValue = 13; > > Intent myIntent = new Intent(v.getContext(), Item.class); > myIntent.putExtras("myValueKeyword", myValue); > > You can also pass arrays, Bundles, Parcelable and much more, just > check out the documentation of "Intent" > > > http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String > , > java.lang.String[]) > > > On Feb 23, 7:09 am, frizzo <[email protected]> wrote: > > Hello, > > > > How can I pass data between forms? For instance, right now to get > > between form 1 and 2, I do the following: > > > > Intent mIntent = new Intent(v.getContext(), Item.class); > > startActivity(mIntent); > > > > which kicks off the class/layout called Item. How do I actually pass > > data to Item? > > > > Thanks > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---

