RelativeLayout.LayoutParams rp = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); rp.addRule(RelativeLayout.CENTER_IN_PARENT);
记录一下