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:
RelativeLayout.LayoutParams layoutParams;
layoutParams = (RelativeLayout.LayoutParams) linearLayoutToMove
.getLayoutParams();
layoutParams.addRule(RelativeLayout.RIGHT_OF,
R.id.new_ref_LinearLayout);
But it does not work :o(
Any clues ?