intent on Android - pass ArrayList to another activity -


I have two activities and I have ArrayList -> Activity B. From Activity A to Objects B Code is listed under section:

In Activity A:

  Intent I = new intent (getApplicationContext (), SiteFoto fullscreen. Bundle meadata = new bundle (); MyData.putInt ("id", position); MyData.putInt ("MaxId", imgAdapter.getCount ()); MyData.putSerializable ("myObjArray", drawablesFromUrl); & Lt; ---- this objs i.putExtras (myData); StartActivity (i); Activity in   

  ArrayList & lt; Drawable & gt; MyObjArray = New ArrayList & lt; Drawable & gt; (); // Intent data means i = getIntent (); Bundle Mybandle = i.getExtras (); Status = myBundle.getInt ("id"); Maxid = myBundle.getInt ("MaxID"); MyObjArray = (ArrayList & lt; Drawable & gt;) i.getSerializableExtra ("myObjArray");   

After executing the code, an error occurs:

  AndroidRuntime (15005): java.lang.RuntimeException: Parcel: Marshall value and roid. Unable to graphics. Drable.bitmap driver @ 4052d928   

Anyone can help me solve the problem, thanks thousands!

Pass your object through the parcelable . Here is a link that will show you how to do it relative easily:



Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -