Note that there are some explanatory texts on larger screens.

plurals
  1. POputParcelableArrayListExtra and black screen
    primarykey
    data
    text
    <p>I have custom class that implements <code>Parcelable</code> and I use it as custom arraylist. </p> <p>When I use <code>putParcelableArrayListExtra</code> and 400 rows it works fine, but 1000 rows it does not. I have black screen and app locks up. What is wrong?</p> <p>EDIT: I sent it here and I don't use it in another Activity.</p> <pre><code>Intent intent = new Intent().setClass(getApplicationContext(), ArtActivity.class); intent.putParcelableArrayListExtra ("mylist", list); startActivityForResult(intent, SECONDARY_ACTIVITY_REQUEST_CODE); </code></pre> <p>My array:</p> <pre><code>ArrayList&lt;Piece&gt; list = new ArrayList&lt;Piece&gt;(); </code></pre> <p>It is my Class:</p> <pre><code>public class Piece implements Parcelable { private String id; private String name; private int type; private String text; private String mp3; public Piece (String id,String name,int type) { this.id=id; this.name=name; this.type=type; } public Piece(Piece ele) { this.id=ele.id; this.name=ele.name; this.type=ele.type; this.text=ele.text; } public Piece (Parcel in) { id = in.readString (); name = in.readString (); type = in.readInt(); text= in.readString(); mp3=in.readString(); } public static final Parcelable.Creator&lt;Piece&gt; CREATOR = new Parcelable.Creator&lt;Piece&gt;() { public Piece createFromParcel(Parcel in) { return new Piece(in); } public Piece[] newArray (int size) { return new Piece[size]; } }; public void makeText(String text) { this.text=text; } public void makeMp3(String mp3) { this.mp3= mp3; } public String getMp3() { return this.mp3; } public String getId() { return id; } public String getName() { return name; } public int getType() { return type; } public String getText() { return text; } public int describeContents() { // TODO Auto-generated method stub return 0; } public void writeToParcel(Parcel dest, int flags) { // TODO Auto-generated method stub dest.writeString (id); dest.writeString (name); dest.writeInt(type); dest.writeString (text); dest.writeString (mp3); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload