Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It is not complete but I think you will get the point. Will try to assist you.</p> <pre><code>public class Row implements Parceleable{ private String thumb; private String bigImage; private String author; private String description; private String date; // your setters and getters here public void setThumb(String thumb){ this.thumb = thumb; } public String getThumb(){ return thumb; } // .... public Row(){ } public Row(Parcel parcel) { thumb = parcel.readString(); bigImage = parcel.readString(); author = parcel.readString(); description = parcel.readString(); date = parcel.readString(); } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int flags) { parcel.writeString(thumb); parcel.writeString(bigImage); parcel.writeString(author); parcel.writeString(description); parcel.writeString(date); } public static final Parcelable.Creator&lt;Row&gt; CREATOR = new Parcelable.Creator&lt;MyParcelable&gt;() { @Override public Row createFromParcel(Parcel in) { return new Row(in); } @Override public Row[] newArray(int size) { return new Row[size]; } }; } </code></pre> <p>Populate from your json:</p> <pre><code>List&lt;Row&gt; myRowArray = new ArrayList&lt;Row&gt;; Row result; for (int i = 0; i &lt; array.length(); i++) { result = new Row(); result.setThumb( fromJson ); //Set thumb string you got from json result.setAuthor( fromJson ); //Set Author string you got from json ..... myRowArray.add(result); } </code></pre> <p>That's how we do it.It is very easy. At the beginning it is little confusing but if you learn the point you will find out it is easy and very handy.</p>
 

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