at the code below, what is the meaning of "ITEM_ID_LIST".

I don't know what to replace this..."ITEM_ID_LIST"

    ArrayList skuList = new ArrayList();
    skuList.add("premiumUpgrade"); 
    skuList.add("gas");
    Bundle querySkus = new Bundle();
    querySkus.putStringArrayList(“ITEM_ID_LIST”, skuList);
有帮助吗?

解决方案

It works as a string Id to identify your arraylist - "skulist". You can replace this with any name of your choice.

其他提示

ITEM_ID_LIST is the key.

When you use the method putStringArrayList(String key, ArrayList<String> value) it inserts an ArrayList value into the mapping of the Bundle, replacing any existing value for the given key.

In terms of hat you can replace it with. You can change it to what ever you want, as long as it is a String.

This should help: http://developer.android.com/reference/android/os/Bundle.html

From Android Developer Docs:

void     putStringArrayList(String key, ArrayList<String> value)
Inserts an ArrayList value into the mapping of this Bundle, replacing any existing value for the given key.

So your "ITEM_ID_LIST" is just a key that maps to skuList in your code. You can use this key value to save and retrieve value of skuList from the Bundle

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top