Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rectangles showing when selected? #136

Open
ColtonIdle opened this issue Apr 8, 2020 · 3 comments
Open

Rectangles showing when selected? #136

ColtonIdle opened this issue Apr 8, 2020 · 3 comments

Comments

@ColtonIdle
Copy link

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:
Screen Shot 2020-04-08 at 2 19 50 PM

What am I doing wrong?

I want just plain dots.

@ColtonIdle
Copy link
Author

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.

@ColtonIdle
Copy link
Author

The solution was to add android:clipToPadding="false" on the circleIndicator in xml. That seemed to fix it.

@DaniilPavlenko
Copy link

DaniilPavlenko commented Jul 27, 2020

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"/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants