title: List<String> addAll() method not adding
body: <p>I am trying to make changes to the data source directly and notify the adapter of any changes. But addAll() does not update my list. It seems everything is OK in my code, but not during run. Please help me to correct the code. Thank You in Advance.</p>
  
  <pre><code>    List&lt;String&gt; pgs = myClass.getPgs();
      List&lt;String&gt; tmppgs = pgs;
  
      /*
      .
       lots of code for string processing which results in &gt;&gt; String content for each i
      .
       */
  
      for (int i = 0; i &lt; tmppgs.size(); i++) {
      tmppgs.set(i, content);
      }
  
      Toast.makeText(getActivity(),String.valueOf(tmppgs.size()), Toast.LENGTH_LONG).show();
      // Toast shows desired result which is OK.
  
      pgs.clear();
      pgs.addAll(tmppgs);
      Toast.makeText(getActivity(),String.valueOf(pgs.size()), Toast.LENGTH_LONG).show();
      //Unexpectedly shows zero
  
      mAdapter.notifyDataSetChanged();
  }
  </code></pre>