Skip to content

Instantly share code, notes, and snippets.

@gotoark
Created October 7, 2017 11:49
Show Gist options
  • Save gotoark/0e89e30c4316004134c914f6452223a5 to your computer and use it in GitHub Desktop.
Save gotoark/0e89e30c4316004134c914f6452223a5 to your computer and use it in GitHub Desktop.
Send Custome List Between Activities
1. Implements Parcellable
public class Consumer implements Parcelable {
......
}
2.Add it to Intents
Intent intent=new Intent(getApplicationContext(),ConsumerDetails.class);
intent.putExtra("consumerList", (ArrayList<Consumer>) ConsumersList);
3.Receieve at Another Activity
if(getIntent().getParcelableArrayListExtra("consumerList")!=null){
consumerList=getIntent().getParcelableArrayListExtra("consumerList");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment