经过研究发现,removeRule是API
17才加的方法,为了在API
17前也能使用,可以使用它的等价方法,使用addRule(verb,
0)。
例如:
RelativeLayout.LayoutParams lp = (LayoutParams) inputTextLayout.getLayoutParams();
lp.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM, 0);
Android开发教程--关于LayoutParams removeRule出错问题的解决
原文:http://blog.csdn.net/wanglixin1999/article/details/46550921