How to modify a relative layout rule programaticaly
<p>I have a linear layout that is contained inside a relative layout. 
It is set in the XML file to be to the right of another linear layout (this works fine).
In some cases I want to change the relative position of the layout during the onCreate of the activity so I need to modify the "to the right of" param to relate to another layout.
I tryed this:</p>

<pre><code>    RelativeLayout.LayoutParams layoutParams;

    layoutParams = (RelativeLayout.LayoutParams) linearLayoutToMove
            .getLayoutParams();
    layoutParams.addRule(RelativeLayout.RIGHT_OF,
            R.id.new_ref_LinearLayout);
</code></pre>

<p>But it does not work :o(</p>

<p>Any clues ?</p>

<p>TIA</p>

<p><strong>EDIT:</strong> Never mind, it does not work if I set in in the xml in the first place. I will need to refer to another Layout.</p>

<p><strong>Here is a new related question. How do I remove an existing rule that was defined in the xml file? Example, I want to change to "to de right" rule to "a "bellow" rule ??</strong></p>
