viewpager指示器的默认颜色为白色.
在 github中的relex viewpager指示器中,
它不包括如何更改指标的颜色.
可能吗?
在 github中的relex viewpager指示器中,
它不包括如何更改指标的颜色.
可能吗?
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<me.relex.circleindicator.CircleIndicator
android:id="@+id/pagerIndicator"
app:ci_width="10dp"
app:ci_height="10dp"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_gravity="bottom"
android:layout_marginBottom="8dp" />
</LinearLayout>
解决方法
<me.relex.circleindicator.CircleIndicator
android:id="@+id/pagerIndicator"
app:ci_width="10dp"
app:ci_height="10dp"
app:ci_drawable="@drawable/circleindicator_round"
android:layout_width="match_parent"
android:layout_height="36dp"
android:layout_gravity="bottom"
android:layout_marginBottom="8dp" />
我不在乎你做什么填充或保证金
但创建一个可绘制的XML文件并添加这些代码
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/colorAccent"/>
<corners android:radius="10dp"/>
</shape>
把它称之为你想要的
但是用
`app:ci_drawable="@drawable/circleindicator_round"`
为我工作