我想將ArrayList<HashMap<String, Object>>
這樣的值添加到intent中,並通過broadc傳遞Activity
。這樣的代碼:set ArrayList <HashMap <String,Object>> value
ArrayList<HashMap<String, Object>> listItem = new ArrayList<HashMap<String, Object>>();
intent1.putParcelableArrayListExtra("listItem", listItem);
但它有錯誤:
The method
putParcelableArrayListExtra(String, ArrayList<? extends Parcelable>)
in the type Intent is not applicable for the arguments(String, ArrayList<HashMap<String,Object>>)
如何使用特定putParcelableArrayListExtra
?通過實現Parcelable接口,它可以返回ArrayList < HashMap < String, Object > >
對象嗎?
非常感謝您的回答。 –
歡迎您:-)請接受此爲答案。 – Deepika