Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing multidimensional string array to new activity in Android [closed]

I want to pass a 2d string array to a new activity. i saw many answers but i didnt get anyone. How can i do this.

like image 762
Ahmad Abbasi Avatar asked Dec 06 '25 02:12

Ahmad Abbasi


1 Answers

use

Intent mIntent = new Intent(this, Example.class);
Bundle mBundle = new Bundle();
mBundle.putSerializable("list", selected_list);
mIntent.putExtras(mBundle);

To get the passed array use

String[][] passedString_list = (String[][]) bundle.getSerializable("list");
like image 163
Amit Hooda Avatar answered Dec 08 '25 16:12

Amit Hooda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!