Is it possible when creating a RelativeLayout at runtime to set the equivalent of android:layout_below programmatically?
android:layout_below
Alternatively you can use the views current layout parameters and modify them:
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) viewToLayout.getLayoutParams(); params.addRule(RelativeLayout.BELOW, R.id.below_id);