title: Remove all items inside linearlayout
body: <p>I create a linearlayout that refes to an xml item. Inside this linearlayout i put some textview dynamically, so without taking them from the xml. Now i need to remove these textviews from the linearlayout. I tried this:</p>
  
  <pre><code>if(((LinearLayout) linearLayout.getParent()).getChildCount() &gt; 0)
      ((LinearLayout) linearLayout.getParent()).removeAllViews();
  </code></pre>
  
  <p>but it doesn't work.
  How can i do?
  Thanks, Mattia</p>