title: Correct way to remove all (Child) fragments
body: <p>I load a bunch of Child fragments dynamically inside a Parent's Fragment linearLayout (fragmentContainer), then when user clicks a button, I need to remove them all and add new ones. I don't know the exact number of fragments that will be added each time. This is my way of removing all the fragments at once</p>
  
  <pre><code>LinearLayout ll = (LinearLayout) view.findViewById(R.id.fragmentContainer);
  ll.removeAllViews();
  </code></pre>
  
  <p>Now I can add the new ones using fragment transaction methods. 
  This way of removing all fragments is super easy and works for me better than removing each fragment one by one using remove() But is it a good practice? How about performance? Do you recommend a better way?</p>
  
  <p><img src="https://i.stack.imgur.com/D2UFh.png" alt="Child fragments"></p>