Monday, April 7, 2014

A list passed to the next Activity


I have two activity, to pass a List variable between this List is stored inside my custom data classes MyDataClass;

If List list = new ArrayList ();


How do I put this list into Intent to go inside, to pass on to the next activity??
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Intent teach you pass List
Reply:
cited a floor tantahe reply:
Intent teach you pass List

But the pass past empty, not good to force conversion
Reply:
MyDataClass implements Serializable
Reply:
As far as I have understood, Intent can only transfer serialized data. You want to pass list, it needs to be serialized can, there is a way, is to write temporary files or saved to the database. Then another window will be read out in his.
Reply:
Attention, and I in order to save, Intent inside wearing basic data types
------------------------- ----------------------------- AutoCSDN Signature -------------------- ----------------------------------
yard farm - yard farmers sow code grazing farms thoughts!

Reply:
If the support serialization, can put Intent, otherwise inherit Application to implement a class, and configure the XML, write like a public property, no delivery.

No comments:

Post a Comment