Android 通过列表<;类别>;从一项活动到另一项活动

Android 通过列表<;类别>;从一项活动到另一项活动,android,json,Android,Json,如何将类列表(即列表)从一个活动传递到另一个活动。 例如,我有以下json:- { "acclst":[{ "accountInfoData":[{ "userId":9, "rid":"1-Z5S3", "acnme":"acc_1234.", "actpe":"Fabricator / Distributor", "mph":"2660016354",

如何将类列表(即列表)从一个活动传递到另一个活动。 例如,我有以下json:-

{
"acclst":[{
    "accountInfoData":[{
            "userId":9,
            "rid":"1-Z5S3",
            "acnme":"acc_1234.",
            "actpe":"Fabricator / Distributor",
            "mph":"2660016354",
            "euse":"Biofuels",
            "com":"0",
            "sta":"Active",
            "stem":"BBUSER5",
            "wsite":"",
            "fax":"",
            "zone":"",
            "crted":"BBUSER4",
            "statusX":1,
            "partyId":0,
            "address":[]
        }
    ]
}
],
"conlst":[],
"actlst":[],
"prolst":[],
"code":"200"
}

那么,如何将conlst从一个活动传递到另一个活动呢?任何示例都会对我有所帮助。

您可以在Bundle中添加列表,并将Bundle放入Intent中

Intent i = new Intent(currentActivity.this,nextActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("key",conlst );  
i.putExtras(packData);
startActivity(i);
否则,将您的类从列表中打包,并像这样将它们打包-

Bundle bundle = new Bundle();
bundle.putParcelableArrayList("key",conlst );    
i.putExtras(packData);
startActivity(i);