title: how to append ListView with information instead or replacing
body: <p>i am writing an Android app that copies the <a href="http://www.rottentomatoes.com/mobile/" rel="nofollow">http://www.rottentomatoes.com/mobile/</a> look, my problem is the following - i have 3 async tasks digging for the json file and extracting info for every of those sections (opening this week, top box office, also in theaters) however when each list replaces the previous one and i need them to append. how can i do this?</p>
  
  <pre><code>public static class PlaceholderFragment extends Fragment implements OnItemClickListener {
  
      private InfoAdapter adapter;
  
      public PlaceholderFragment() {
      }
  
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container,
              Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.fragment_main, container,
                  false);
          ListView list = (ListView) rootView.findViewById(R.id.list);
          list.setOnItemClickListener(this);
          adapter = new InfoAdapter(inflater);
          list.setAdapter(adapter);
          String link = "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/box_office.json?apikey=pgmnsbx5sza3rys7uvtw";
          DownloadMovieInfo task = new DownloadMovieInfo(link, adapter);
          task.execute(new Void[0]);
  
  
           link = "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/opening.json?apikey=pgmnsbx5sza3rys7uvtw";
          task = new DownloadMovieInfo(link, adapter);
          task.execute(new Void[0]);
  
          link = "http://api.rottentomatoes.com/api/public/v1.0/lists/movies/in_theaters.json?apikey=pgmnsbx5sza3rys7uvtw";
          DownloadMovieInfo task2 = new DownloadMovieInfo(link, adapter);
          task2.execute(new Void[0]);
  
          return rootView;
      }
  </code></pre>
  
  <p>here is the async task</p>
  
  <pre><code>public class DownloadMovieInfo extends AsyncTask&lt;Void, Void, MovieInfo&gt; {
  private String link;
  private MovieInfo list;
  private InfoAdapter adapter;
  
  public DownloadMovieInfo(String link, InfoAdapter adapter) {
      this.link = link;
      this.adapter = adapter;
  }
  
  @Override
  protected MovieInfo doInBackground(Void... params) {
      // TODO Auto-generated method stub
  
      URL url = null;
      URLConnection connection = null;
      Gson gson = new Gson();
      InputStream in = null;
      BufferedReader reader = null;
      try {
          url = new URL(link);
          connection = url.openConnection();
          in = connection.getInputStream();
          reader = new BufferedReader(new InputStreamReader(in));
          list = gson.fromJson(reader, MovieInfo.class);
      } catch (IOException e) {
          e.printStackTrace();
      }
  
      return list;
  }
  
  protected void onPostExecute(MovieInfo result) {
      super.onPostExecute(result);
  
      adapter.setinfo(result);
      adapter.notifyDataSetChanged();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I can imagine the problem is adapter.setInfo(result); because this is what actually setting the data to the list, but i did not quite figured out how to append to the list. please help</p>
  
  <p>PS last 6 digits removed from the key, so it wont work for you</p>