I want to move an adapter object from one activity to another.
My main activity:
Intent intent = new Intent(MainActivity.this, ActivityTest.class);
intent.putExtra("Key1", position);
intent.putExtra("key2", toyAdapter);
startActivity(intent);
My second activity:
Intent intent = getIntent();
int position = intent.getIntExtra("Key1", 0);
ToyAdapter toyAdapter = (ToyAdapter) intent.getSerializableExtra("Key2");
I know something's wrong but I am pretty new to this and therefore I am not sure what's the right way to move that Adapter Object to my second activity. Thanks