Sando
Sando

Reputation: 1881

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).

Upvotes: 0

Views: 964

Answers (2)

Bhushan Kawadkar
Bhushan Kawadkar

Reputation: 28513

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

Upvotes: 0

ngesh
ngesh

Reputation: 13501

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..

Upvotes: 2

Related Questions