【发布时间】:2021-04-03 08:42:36
【问题描述】:
我正在使用这个库https://github.com/ongakuer/CircleIndicator,在某些情况下会出现太多数据。指示器从屏幕上消失了,我可以给它添加动画吗,ios中默认存在动画。
Ios 示例:https://streamable.com/6nu6j3
安卓问题:
我之前发现这是一个类似的问题,我想知道是否有像在 ios 中那样更好的解决方案
How to set a limit of items on CirclePageIndicator?
布局
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/viewPager2"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<me.relex.circleindicator.CircleIndicator3
android:id="@+id/circleIndicator"
android:layout_width="match_parent"
android:layout_height="5dp"
android:layout_below="@id/viewPager2"
android:layout_centerInParent="true"
android:layout_gravity="center_horizontal"
android:layout_marginLeft="25dp"
android:layout_marginTop="20dp"
android:layout_marginRight="25dp"
android:gravity="center"
app:ci_drawable="@drawable/circle"
app:ci_height="5dp"
app:ci_width="5dp" />
编辑:
这个库我的作品已经读过了 -> https://github.com/wching/Android-Indefinite-Pager-Indicator
【问题讨论】:
-
显示你的布局文件
-
@VivekThummar 我添加了
-
只有
CircleIndicator会出现这个问题还是viewpager也会出现这个问题? -
好的,我找到了问题,这将对您有所帮助..github.com/ongakuer/CircleIndicator/issues/120
-
@VivekThummar 谢谢,我找到了 lib -> github.com/IslamKhSh/CardSlider
标签: android viewpagerindicator