从一个活动到其他通过数组列表数组、列表

由网友(偏执)分享简介:如何传递的ArrayList 从一个活动到另一个活动?How can I pass ArrayList from one activity to other activity?推荐答案这取决于ArrayList的类型It depends on the type of arraylist putInteger...

如何传递的ArrayList 从一个活动到另一个活动?

How can I pass ArrayList from one activity to other activity?

推荐答案

这取决于ArrayList的类型

It depends on the type of arraylist

putIntegerArrayListExtra(字符串名称,ArrayList的<整数GT;值)

putParcelableArrayListExtra(字符串名称,ArrayList的&LT ;?延伸Parcelable>值)

putStringArrayListExtra(字符串名称,ArrayList的<字符串>值)

putCharSequenceArrayListExtra(字符串名称,ArrayList的< CharSequence的>值)

然后就可以通过更换从你读下一个活动 GET 以关键字为参数,如

Then you can read from you next activity by replacing put with get with key string as argument,eg

myIntent.getStringArrayListExtra("arrayPeople");
阅读全文

相关推荐

最新文章