I'm trying to pass an HashMap object to another activity using getter tableRow.getRowData() as shown in code below:
tableRow.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent newIntent = new Intent(getApplicationContext(), ToDoDetailActivity.class);
putExtras(newIntent, tableRow.getRowData());//<---
startActivity(newIntent);
}
});
Actually tableRow object belong to a custom class that inherits from TableRow which inside an HashMap<String, String> rowData that represents the entire row (key: 'DB column', value: 'DB field value'). As I said, rowData is returned by getRowData().
Is this a good way to transfer object within putExtras()?
Also, seeing this Android tutorial, I can't figure how to deal with rowData to the other activity.
EDIT:
My question is a bit different from this because it's not possible to pass, even if HashMap class is serialized by default, hash map object through putExtra() (I've tryed to do so by previously seen that question).