title: Nested RecyclerViews : Cannot call notifyDataSetChanged() method while RecyclerView is computing a layout or scrolling
body: <p>I have to do nested RecyclerView.<br>
  I have  a big list : <strong>list_one</strong>, which contains a title and another list, <strong>list_two</strong>, which contains a String and a CheckBox.</p>
  
  <p>When setting up a <strong>list_two</strong>, if the String is selected (by default), I want to call the adapter of <strong>list_one</strong> to add an item, and call <em>notifyDataSetChanged()</em>.</p>
  
  <p>But, when I do that, I get an exception :</p>
  
  <pre><code>Cannot call this method while RecyclerView is computing a layout or scrolling.
  </code></pre>
  
  <p>I think that it's because the <strong>list_two</strong> did not charged completely yet, so the size of <strong>list_one</strong> is not set correctly.</p>
  
  <p>Is there a way to <strong>wait until the list_two charged completely, to call <em>notifyDataSetChanged</em> in the first list ?</strong></p>
  
  <p>Here is a picture to help you visualize the lists goal :
  <a href="https://i.stack.imgur.com/14gLa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/14gLa.png" alt="enter image description here"></a></p>
  
  <p>The <strong>first_list</strong> contains "Couleur", "Taille" and "Test".</p>
  
  <p>The <strong>second_list</strong> of the <strong>first_list</strong> first item contains "Bleu", "Rouge" and "Vert" (pretty confusing, I know)</p>
  
  <p>For example, if I select "Rouge", the <strong>first_list</strong> needs to refresh to add or delete some items that are not compatible with "Rouge".<br>
  That's why I need to do this trick.</p>
  
  <p>Thanks for your attention.</p>