remove rule from RelativeLayout before api 17

Prior to API 17, how do I remove a rule from a layout? I have a RelativeLayout with a number of children. The RelativeLayout is the main layout of my activity. After adding the rule programmatically using

RelativeLayout.LayoutParams layout = (LayoutParams) theChild.getLayoutParams();
layout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);

I need to remove the rule programmatically at some later time. How would I do this assuming earlier API than 17?


Solution 1:

Ah, I figure it out.

RelativeLayout.LayoutParams layout = (LayoutParams) myChild.getLayoutParams();
layout.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);

So there is really no removeRule until API 17.