开发者

How to use putStringArrayListExtra(name, value) for adding extras to android intent.

I want to add multiple extras to my intent and retrive them.Is it possible with putStringArrayListExtra(name, 开发者_运维问答value).


yes you can do.. just like this..

Intent i = new Intent(context, New.class);
i.putStringArrayListExtra("list", value);
startActivity(i);

You should also make sure that ArrayList() holds only String Values..


You can add multiple extras in to putStringArrayListExtra as it is a map and retrive the lists by key name.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜