title: Android Json - Array Adapter to list view - Multiple strings, multiple text fields
body: <p>I think im going about this all wrong and just need a push in the right direction. I parsed my json information and set them to set fields, so each one can be called and displayed. Now this only works for 1 field at a time I can't load more than one using the adapter. Do I need to compile all of these arrays into one to be called via a custom adapter? Here is my code:</p>
  
  <pre><code>public class LocalJsonFileActivity extends ListActivity {
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      try {
          BufferedReader jsonReader = new BufferedReader(new InputStreamReader(this.getResources().openRawResource(R.raw.localjsonfile)));
          StringBuilder jsonBuilder = new StringBuilder();
          for (String line = null; (line = jsonReader.readLine()) != null;) {
              jsonBuilder.append(line).append("\n");
          }
  
          JSONTokener tokener = new JSONTokener(jsonBuilder.toString());
          JSONArray jsonArray = new JSONArray(tokener);
  
  
          ArrayList&lt;String&gt; name = new ArrayList&lt;String&gt;();
          for (int index = 0; index &lt; jsonArray.length(); index++) {
              JSONObject jsonObject = jsonArray.getJSONObject(index);
              name.add(jsonObject.getString("name"));
          }
  
          ArrayList&lt;String&gt; bloodtype = new ArrayList&lt;String&gt;();
          for (int index = 0; index &lt; jsonArray.length(); index++) {
              JSONObject jsonObject = jsonArray.getJSONObject(index);
              bloodtype.add(jsonObject.getString("bloodtype"));
          }
  
          ArrayList&lt;String&gt; type = new ArrayList&lt;String&gt;();
          for (int index = 0; index &lt; jsonArray.length(); index++) {
              JSONObject jsonObject = jsonArray.getJSONObject(index);
              type.add(jsonObject.getString("type"));
  
          }
  
          ArrayList&lt;String&gt; dob = new ArrayList&lt;String&gt;();
          for (int index = 0; index &lt; jsonArray.length(); index++) {
              JSONObject jsonObject = jsonArray.getJSONObject(index);
  
              String series = jsonObject.getString("dob");
  
              if (series.equals("December")) {
                  dob.add(jsonObject.getString("dob"));
              }
          }
  
          setListAdapter(new ArrayAdapter&lt;String&gt;
                  (this, R.layout.usercard, R.id.txttype, type));
  
  
      } catch (FileNotFoundException e) {
          Log.e("jsonFile", "file not found");
      } catch (IOException e) {
          Log.e("jsonFile", "ioerror");
      } catch (JSONException e) {
          Log.e("jsonFile", "error while parsing json");
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>layout main is just a blank list view. My layout card has 4 fields 1 that is image view. But I can't seem to show more than 1 piece of information. Reading data in single fields and then outputting is great. I would just like to add the text to all fields.</p>