ongakuer / CircleIndicator

A lightweight indicator like in nexus 5 launcher
Apache License 2.0
4.27k stars 712 forks source link

Any idea why my selected indicator is wider than the other circles? #118

Closed casolorz closed 5 years ago

casolorz commented 5 years ago

This is my layout:

<me.relex.circleindicator.CircleIndicator
            android:id="@+id/banner_indicator"
            android:layout_width="wrap_content"
            android:layout_height="6dp"
            app:ci_width="6dp"
            app:ci_height="6dp"
            app:ci_orientation="horizontal"
            android:layout_marginTop="4dp"
            app:layout_constraintLeft_toLeftOf="@+id/banner_pager"
            app:layout_constraintRight_toRightOf="@+id/banner_pager"
            app:layout_constraintTop_toBottomOf="@+id/banner_pager"/>

And this is what it ends up looking like:

image

RomanZhilich commented 5 years ago

The trouble is with default animator included in library scale_with_alpha.xml. Create another one manually and reference it from layout with app:ci_animator=

casolorz commented 5 years ago

Thanks, that fixed it. Is there a recommended way to do the animator? I just changed the 1.8 to 1.0.

NecoJack commented 5 years ago

Does not work “Create another one manually and reference it from layout with app:ci_animator=”

casolorz commented 5 years ago

It worked for me but I changed the animator from 1.8 to 1.0.

ongakuer commented 5 years ago

@casolorz

android:layout_height has to be bigger than app:ci_height

ongakuer commented 5 years ago

129

omkar-tenkale commented 2 years ago

Fix for this issue: https://github.com/ongakuer/CircleIndicator/issues/129#issuecomment-1204974400