android pass list to intent

android pass list to intent
// Intent myIntent= new Intent(getApplicationContext(),YourActivity.class);
Intent myIntent = getIntent();

// using bundle 
Bundle bundle = new Bundle();
bundle.putParcelable("data", storingObject);
myIntent.putExtras(bundle);
// or
List<Object> list = new ArrayList<Object>();
myIntent.putExtra("LIST", (Serializable) list);

// intent to list
list = (List<Object>) myIntent.getSerializableExtra("LIST");

startActivity(intent);
Sou‮www:ecr‬.lautturi.com
Created Time:2017-10-05 15:53:51  Author:lautturi