首页 > 代码库 > Android 动态设置 layout_centerInParent

Android 动态设置 layout_centerInParent

        RelativeLayout.LayoutParams rp = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
        rp.addRule(RelativeLayout.CENTER_IN_PARENT);

  记录一下

Android 动态设置 layout_centerInParent