CircleIndicator
CircleIndicator copied to clipboard
Rectangles showing when selected?
Here is my xml
<me.relex.circleindicator.CircleIndicator
android:id="@id/circleIndicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@+id/pager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_marginBottom="48dp"
app:ci_drawable="@drawable/white_radius"
app:ci_drawable_unselected="@drawable/white_radius"
/>
kotlin
pager.adapter = adapter
circleIndicator.setViewPager(pager)
version
me.relex:circleindicator:2.1.4
I believe I'm using ViewPager1? androidx.viewpager.widget.ViewPager
Output:
What am I doing wrong?
I want just plain dots.
I might have found the issue. Using Chris Banes' insetter lib https://github.com/chrisbanes/insetter in order to inset at the top of my screen because I draw edge to edge, it breaks CircleIndicator library.
Please let me know if you think you can fix this.
The solution was to add android:clipToPadding="false"
on the circleIndicator in xml. That seemed to fix it.
In my case the rectangle is displayed until I set the android:layout_height
from wrap_content
to an absolute value (20dp
)
<me.relex.circleindicator.CircleIndicator
android:id="@+id/dot_indicator"
android:layout_width="match_parent"
android:layout_height="20dp"/>