title: Display JSONObject in another activity ListView
body: <p>I want data from my <strong><code>JSON</code></strong> to be displayed in another <strong><code>Activity</code></strong> inside a <strong><code>ListView</code></strong> with 3 columns. I made a <strong><code>Layout</code></strong> for my <strong><code>ListView</code></strong> but that's all</p>
  <pre><code>  &lt;RelativeLayout
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;100dp&quot;
      android:descendantFocusability=&quot;afterDescendants&quot;
      android:orientation=&quot;vertical&quot;
      android:paddingBottom=&quot;15dp&quot;
      android:paddingLeft=&quot;15dp&quot;
      android:paddingRight=&quot;15dp&quot;
      android:paddingTop=&quot;15dp&quot;&gt;
  
      &lt;TextView
          android:id=&quot;@+id/txtViewNumarCumparator&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_alignParentLeft=&quot;true&quot;
          android:layout_alignParentTop=&quot;true&quot;
          android:text=&quot;NumarCumparator&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/listaProduse&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_alignParentLeft=&quot;true&quot;
          android:layout_below=&quot;@+id/txtViewNumarCumparator&quot;
          android:layout_marginTop=&quot;10dp&quot;
          android:text=&quot;NumarProduse&quot; /&gt;
  
      &lt;TextView
          android:id=&quot;@+id/sumaProduse&quot;
          android:layout_width=&quot;wrap_content&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_alignParentRight=&quot;true&quot;
          android:layout_alignParentTop=&quot;true&quot;
          android:layout_marginTop=&quot;15dp&quot;
          android:text=&quot;SumaProdsue&quot; /&gt;
  </code></pre>
  <p>I have a <strong><code>JSONObject</code></strong> which retrieves data like this :</p>
  <pre><code>{&quot;dataCurenta&quot;:&quot;11-08-2017&quot;,
   &quot;produseSelectate&quot;:3,
   &quot;pretTotal&quot;:605  
  }
  </code></pre>
  <p>Here is the code :</p>
  <pre><code>            JSONObject json = new JSONObject();
              try {
                  json.put(&quot;dataCurenta&quot;, getDate(calendarData.getTimeInMillis()));
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              try {
                  json.put(&quot;produseSelectate&quot;, listaProdusePreview.getAdapter().getCount());
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              try {
                  json.put(&quot;pretTotal&quot;, totalPrice);
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              try {
                  json.put(&quot;numarVanzare&quot;, numarVanzare);
              } catch (JSONException e) {
                  e.printStackTrace();
              }
              Log.d(&quot;LISTA&quot;, json.toString());
  </code></pre>
  <p>Adapter :</p>
  <pre><code>public class CardArrayAdapter  extends ArrayAdapter&lt;Card&gt; {
  private static final String TAG = &quot;CardArrayAdapter&quot;;
  private List&lt;Card&gt; cardList = new ArrayList&lt;Card&gt;();
  
  static class CardViewHolder {
      TextView line1;
      TextView line2;
      TextView line3;
  }
  
  public CardArrayAdapter(Context context, int textViewResourceId) {
      super(context, textViewResourceId);
  }
  
  @Override
  public void add(Card object) {
      cardList.add(object);
      super.add(object);
  }
  
  @Override
  public int getCount() {
      return this.cardList.size();
  }
  
  @Override
  public Card getItem(int index) {
      return this.cardList.get(index);
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View row = convertView;
      CardViewHolder viewHolder;
      if (row == null) {
          LayoutInflater inflater = (LayoutInflater) this.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          row = inflater.inflate(R.layout.list_item_card, parent, false);
          viewHolder = new CardViewHolder();
          viewHolder.line1 = (TextView) row.findViewById(R.id.txtViewNumarCumparator);
          viewHolder.line2 = (TextView) row.findViewById(R.id.listaProduse);
          viewHolder.line3 = (TextView) row.findViewById(R.id.sumaProduse);
          row.setTag(viewHolder);
      } else {
          viewHolder = (CardViewHolder)row.getTag();
      }
      Card card = getItem(position);
  
          viewHolder.line1.setText(card.getNumarCumparator());
          viewHolder.line2.setText(card.getListaProduse());
          viewHolder.line3.setText(card.getSumaProduse());
  
      return row;
  }
  
  public Bitmap decodeToBitmap(byte[] decodedByte) {
      return BitmapFactory.decodeByteArray(decodedByte, 0, decodedByte.length);
  } }
  </code></pre>
  <p>Object class :</p>
  <pre><code>public class Card {
  private Integer numarCumparator;
  private String listaProduse;
  private Integer sumaProduse;
  
  public Card(Integer numarCumparator, String listaProduse, Integer sumaProduse) {
      this.numarCumparator = numarCumparator;
      this.listaProduse = listaProduse;
      this.sumaProduse = sumaProduse;
  }
  
  public Integer getNumarCumparator() {
      return numarCumparator;
  }
  
  public void setNumarCumparator(Integer numarCumparator) {
      this.numarCumparator = numarCumparator;
  }
  
  public String getListaProduse() {
      return listaProduse;
  }
  
  public void setListaProduse(String listaProduse) {
      this.listaProduse = listaProduse;
  }
  
  public Integer getSumaProduse() {
      return sumaProduse;
  }
  
  public void setSumaProduse(Integer sumaProduse) {
      this.sumaProduse = sumaProduse;
  }}
  </code></pre>
  <p>Hope the question is clear, I really need to get out from this problem.</p>