0
我試圖通過ArrayList<ArrayList<LatLng>>
從一個意圖到另一個使用putParcelableArrayListExtra()
但由於某種原因它不喜歡我的列表。我定義與ArrayList<ArrayList<LatLng>> listOfStrokes = new ArrayList<>();
數組列表,我試圖用通過intent傳遞LatLng的多維ArrayList
ArrayList<ArrayList<LatLng>> listOfStrokes = new ArrayList<>();
Intent intent = new Intent(this, CreateFarm.class);
intent.putParcelableArrayListExtra("listOfStrokes", listOfStrokes);
通過它,但我得到一個
Error:(383, 65) error: incompatible types: ArrayList> cannot be converted to ArrayList
錯誤。有沒有辦法傳遞這個對象?
這是你說的listOfStrokes魔術麼? –
這是我的多維ArrayList。我將重新格式化我的問題,使其更清晰 –
不應該像ArrayList> listOfStrokes = new ArrayList (); Android不是Java8,你必須指定完整的名稱...... –