code: public static RelativeLayout.LayoutParams addRule(View view, int verb, int anchor) {
          RelativeLayout.LayoutParams params = getParams(view);
          params.addRule(verb, anchor);
          view.requestLayout();
          return params;
      }
docs: Add the rule to the View's RelativeLayout params and request a layout of the View.