我想以编程方式在圆圈指示器中设置这些规则:
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);