Created
October 7, 2017 11:49
-
-
Save gotoark/0e89e30c4316004134c914f6452223a5 to your computer and use it in GitHub Desktop.
Send Custome List Between Activities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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