// apply a layout rule static void ApplyRule(Android.Widget.RelativeLayout.LayoutParams lp, LayoutRule rule) { if (rule.Subject.HasValue) { lp.AddRule(rule, rule.Subject.Value); } else { lp.AddRule(rule); } }
// remove a layout rule static void RemoveRule(Android.Widget.RelativeLayout.LayoutParams lp, LayoutRule rule) { lp.RemoveRule(rule.Verb); }