Delete objects in GridLayout before adding new objects
<p>Every time i press a button i fill a GridLayout with several buttons. This is the code that do it, but i don't think it's necessary for you to understand my problem</p>

<pre><code>for(int i=0; i &lt; numeroBottoni;i++){
        Spec row = GridLayout.spec(numeroRiga, 1); 
        Spec colspan = GridLayout.spec(numeroColonna, 1);
        GridLayout.LayoutParams gridLayoutParam = new GridLayout.LayoutParams(row,colspan);
        gridLayoutParam.width=larghezzaColonna;
        gridLayoutParam.height=larghezzaColonna;// l'altezza della colonna la faccio uguale alla larghezza
        gridLayout.addView(buttonName,gridLayoutParam);
</code></pre>

<p>}</p>

<p>The new buttons overlap the old ones, so i suppose i should "delete" the old buttons before adding the new ones.
But i dont know what i should do. I don't know if i have to "delete" the <code>button</code> or if i have to "clean"  the <code>GridLayout</code>.</p>

<p>I tried to call <code>invalidate()</code> both on <code>button</code> and  <code>GridLayout</code> but this is not the solution</p>
