What is the simplest way to transfer (save/load) the values of an array variable (i.c. the variable has the form of int [10][100], so 1000 values) between two activities?
Asked
Active
Viewed 43 times
1 Answers
1
In your first Activity:
int[][] myArray = new int[10][100];
Intent intent = new Intent();
intent.putExtra("myArrayKey", myArray);
startActivity(intent);
And in your second Activity:
int[][] myArray = (int[][]) getIntent().getSerializableExtra("myArrayKey");

Juan Daniel Ornella
- 613
- 7
- 13