title: The content of the adapter has changed bt ListView didn't receive a notification.Make sure the content
body: <p>Here I am getting error while i click on generated list.  </p>
  
  <p>Here is my stack trace.</p>
  
  <blockquote>
    <p>java.lang.IllegalStateException: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. [in ListView(2131034118, class android.widget.ListView) with Adapter(class android.widget.SimpleAdapter)]</p>
  </blockquote>
  
  <p>This is intitializing code;</p>
  
  <pre><code>ArrayList&lt;HashMap&lt;String, String&gt;&gt; rssItemList = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  List&lt;RSSItem&gt; rssItems = new ArrayList&lt;RSSItem&gt;();
  RSSItem rssItem;
  RSSParser rssParser = new RSSParser();
  </code></pre>
  
  <p>And this is my class which gives error.</p>
  
  <pre><code>    @Override
      protected void onPreExecute() {
          super.onPreExecute();
          rssItemList.clear();
      }
  
      @Override
      protected String doInBackground(String... args) {
          String url = args[0];
          rssItems = rssParser.getRSSFeedItems(url);
          // updating UI from Background Thread
          runOnUiThread(new Runnable() {
              public void run() {
                  FeedDBHandler rssDb = new FeedDBHandler(
                          getApplicationContext());
                  // RSSItem rssItem;
                  rssItems.size();
                  Log.i("size", "size:" + rssItems.size());
                  if (rssItems != null) {
                      for (RSSItem item : rssItems) {
                          // creating new HashMap
                          HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  
                          // Truncating description
                          String description = item.getDescription();
                          if (description.length() &gt; 100)
                              description = description.substring(3, 97)
                                      + "..";
  
                          // Store in database
                          rssItem = new RSSItem(item.getTitle(),
                                  item.getLink(), item.getCategory(),
                                  description, item.getPubdate());
  
                          // check if not exist -notify and insert
                          if (!rssDb.isExistItem(item.getLink())) {
                              createNotification(item.getTitle());
                              rssDb.addFeed(rssItem);
                          }
                          createNotification(item.getTitle());
                          if (map != null) {
                              map.put(TAG_TITLE, item.getTitle());
                              map.put(TAG_LINK, item.getLink());
                              map.put(TAG_CATEGORY, item.getCategory());
                              map.put(TAG_DESRIPTION, description);
                              map.put(TAG_PUB_DATE, item.getPubdate());
                          }
  
                          rssItemList.add(map);
                      }
                  }
  
                  /**
                   * Updating parsed items into listview
                   * */
                  // runOnUiThread(new Runnable() {
                  // public void run() {
                  // adding HashList to ArrayList
                  ListAdapter adapter = new SimpleAdapter(
                          AndroidRSSReaderList.this, rssItemList,
                          R.layout.rss_item_list_row, new String[] {
                                  TAG_LINK, TAG_TITLE, TAG_DESRIPTION,
                                  TAG_PUB_DATE }, new int[] { R.id.page_url,
                                  R.id.title, R.id.link, R.id.pub_date });
  
                  // updating listview
                  lv.setAdapter(adapter);
                  // registerForContextMenu(lv);
                  // setListAdapter(adapter);
              }
          });
          return null;
      }
  
      @Override
      protected void onPostExecute(String result) {
          // dismiss the dialog after getting all products
          // pDialog.dismiss();
          runOnUiThread(new Runnable() {
              public void run() {
                  if (rssItem != null) {
  
                  }
              }
          });
      }
  </code></pre>
  
  <p>This is my AsyncTask Class.</p>