Set “android:layout_below” at runtime Programmatically August 28, 2017 RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) viewToLayout.getLayoutParams(); params.addRule(RelativeLayout.BELOW, R.id.below_id); References https://stackoverflow.com/questions/3277196/can-i-set-androidlayout-below-at-runtime-programmatically Related