如何在circleIndicator中以编程方式设置app:centered,fillColor,app:pageColor和app:snap?

时间:2018-12-22 19:04:28

标签: java android

我想以编程方式在圆圈指示器中设置这些规则:

            app:centered="true"
            app:fillColor="#ff0099"
            app:pageColor="#FF0000"
            app:snap="false"

我添加了一些规则:

  RelativeLayout.LayoutParams params1= new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
    params.addRule(RelativeLayout.CENTER_HORIZONTAL);
    params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
    params.addRule(Gravity.BOTTOM);
    params.addRule(Gravity.BOTTOM);


    indicator.setPadding(0,0,0,10);
    indicator.setLayoutParams(params1);

0 个答案:

没有答案