2つのアクティビティがあり、ArrayList->drawablesFromUrlobjsをアクティビティAからアクティビティBに渡したい。コードの一部は次のようにリストされています。
アクティビティA:
Intent i = new Intent(getApplicationContext(),SitePhotoFullScreen.class);
Bundle myData = new Bundle();
myData.putInt("id", position);
myData.putInt("MaxId", imgAdapter.getCount());
myData.putSerializable("myObjArray",drawablesFromUrl);<---- this objs
i.putExtras(myData);
startActivity(i);
アクティビティBで
ArrayList<Drawable> myObjArray = new ArrayList<Drawable>();
// get intent data
Intent i = getIntent();
Bundle myBundle = i.getExtras();
position = myBundle.getInt("id");
MaxId = myBundle.getInt("MaxId");
myObjArray = (ArrayList<Drawable>) i.getSerializableExtra("myObjArray");
コードを実行した後、エラーが発生します:
AndroidRuntime(15005): java.lang.RuntimeException: Parcel: unable to marshal value android.graphics.drawable.BitmapDrawable@4052d928
誰でも私が問題を解決するのを手伝ってくれる、何千もの感謝!