title: Object ArrayList not displaying to ListView
body: <p>So I'm trying to combine two different types of <code>ArrayLists</code> (<code>GregorianCalendar</code> &amp; <code>String</code>) into a third <code>ArrayList</code>. Then display that <code>ArrayList</code> to a <code>ListView</code>. I can't figure out why it's not displaying because I'm not getting any errors and it seems like it should work.</p>
  
  <p>The code for the model is as follows.</p>
  
  <pre><code>import java.io.Serializable;
  import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.Calendar;
  import java.util.GregorianCalendar;
  
  import android.util.Log;
  
  public class Model implements Serializable {
  
  public static final int END_MORNING = 11;  // 11:00AM, inclusive
  public static final int END_AFTERNOON = 16;  // 4:00PM, inclusive
  
  
  private GregorianCalendar startDate;
  
  private ArrayList&lt;GregorianCalendar&gt; datesSmoked = new ArrayList&lt;GregorianCalendar&gt;();
  private ArrayList&lt;String&gt; locationsSmoked = new ArrayList&lt;String&gt;();
  private ArrayList&lt;String&gt; locations = new ArrayList&lt;String&gt;();
  private ArrayList&lt;String&gt; allIncidents = new ArrayList&lt;String&gt;();
  
  
  public String [] defaultLocations = {"Home", "Work", "Commuting", "School", "Bar",  "Restaurant", "Social Gathering", "Other"};
  public String [] newLocation = {"",""}; 
  
  public Model(GregorianCalendar date){
      startDate = date;
  
      for (String s : this.defaultLocations) {            
          locations.add(s);
      }           
  }
  
  public Model(){
      this(new GregorianCalendar()); // now
  }
  
  public void setLocationSmoked() {
      for (String s : this.newLocation) {
          locationsSmoked.add(s);
      }
  }
  
  public void setAllIncidentsArray() {        
      allIncidents.add(datesSmoked.toString());
      allIncidents.add(locationsSmoked.toString());
  }
  
  public ArrayList&lt;String&gt; getAllIncidentsArray() {
      return allIncidents;
  }
  
  public ArrayList&lt;String&gt; getlocationsArray() {
      return locations;
  }
  
  public ArrayList&lt;String&gt; getLocationsSmokedArray() {
      return locationsSmoked;
  }
  
  public ArrayList&lt;GregorianCalendar&gt; getDatesSmokedArray() {
      return datesSmoked;
  }
  
  public void incrementCount(String location) {   
      this.datesSmoked.add(new GregorianCalendar());  // now
      this.locationsSmoked.add(location);     
  }
  
  public int getTodayCount() {
      GregorianCalendar now = new GregorianCalendar();
      int todayDayOfYear = now.get(Calendar.DAY_OF_YEAR);
  
      int count = 0;
      for (GregorianCalendar day : this.datesSmoked)
          if (day.get(Calendar.DAY_OF_YEAR) == todayDayOfYear)
              count++;
  
      return count;
  }
  
  public int getTotalCount() {
      return this.datesSmoked.size();
  }
  
  public double getAverage() {
      if (getDays() &gt; 0)
          return (double) getTotalCount() / getDays();
      else
          return 0.0;
  }
  
  public int getDays() {
      return (new GregorianCalendar()).get(Calendar.DAY_OF_YEAR) - startDate.get(Calendar.DAY_OF_YEAR) + 1;
  }
  
  public int getMorning() {
      int count = 0;
      for (GregorianCalendar date : this.datesSmoked)
          if (date.get(Calendar.HOUR_OF_DAY) &lt;= END_MORNING)
              count++;
  
      return count;
  }
  
  public int getAfternoon() {
      int count = 0;
      for (GregorianCalendar date : this.datesSmoked)
          if (date.get(Calendar.HOUR_OF_DAY) &gt; END_MORNING &amp;&amp; date.get(Calendar.HOUR_OF_DAY) &lt;= END_AFTERNOON)
              count++;
  
      return count;
  }
  
  public int getEvening() {
      int count = 0;
      for (GregorianCalendar date : this.datesSmoked)
          if (date.get(Calendar.HOUR_OF_DAY) &gt; END_AFTERNOON)
              count++;
  
      return count;
  }
  }
  </code></pre>
  
  <p>This code is for the Activity trying to display the array in the listview</p>
  
  <pre><code>import java.io.ObjectInputStream;
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.util.Log;
  import android.view.Menu;
  import android.view.MenuItem;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  public class AllIncidentsActivity extends Activity {
  
  public static final String SMOKIN_DATA_FILE = "smokin.dat";
  
  public static Model model = null;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      setContentView(R.layout.activity_all_incidents);
  
      restoreModel();
  
      ListView listView = (ListView) findViewById(R.id.all_incidents_listview_Id);
      ArrayAdapter&lt;String&gt; listAdapter = new ArrayAdapter&lt;String&gt;(this,
              android.R.layout.simple_list_item_1, model.getAllIncidentsArray());     
      listView.setAdapter(listAdapter);
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      getMenuInflater().inflate(R.menu.activity_all_incidents, menu);
      return true;
  }
  
  public void restoreModel() {
      // Restore from disk, or start with an empty model
      try {
  
          ObjectInputStream ois = new ObjectInputStream(
                  openFileInput(SMOKIN_DATA_FILE));
  
          model = (Model) ois.readObject();
          ois.close();
  
      } catch (Exception e) {
          Log.v("*** DEBUG ***", "Error writing to file: " + e);
          model = new Model();
      }
  }   
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle item selection
      switch (item.getItemId()) {
  
          case R.id.menu_home_Id:
              Intent homeIntent = new Intent(this, AllIncidentsActivity.class);
              startActivity(homeIntent); ;                
              return true;
  
          case R.id.menu_locations_Id:
              Intent locationsIntent = new Intent(this, LocationActivity.class);
              startActivity(locationsIntent); ;                
              return true;
  
          case R.id.menu_edit_locations_Id:
              Intent editLocationsIntent = new Intent(this, EditLocationsActivity.class);
              startActivity(editLocationsIntent); ;                
              return true;
          default:
              return super.onOptionsItemSelected(item);
      }
  }
  
  }
  </code></pre>
  
  <p>Thank you in advance for any help.</p>