这么一段代码
RelativeLayout lyUser=new RelativeLayout(this);
lyUser.setId(layUserID);
RelativeLayout.LayoutParams margin = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.FILL_PARENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
margin.setMargins(15, 62, 15, 0);
lyUser.setLayoutParams(margin);
运行后Margin边界没反应
------解决方案--------------------
RelativeLayout.LayoutParams margin = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT,RelativeLayout.LayoutParams.WRAP_CONTENT);
margin.leftMargin = x;
margin.topMargin = y;