English | 中文
VPLM 实现了一些常见的动画效果,如果你有什么别的想要的效果欢迎给我提ISSUE以及PR
各个layoutmanager都有各自的一些属性可以设置
比如:
- 半径
- 滚动速度
- 间隔
- 排列方向
可以运行下demo看下具体有哪些属性可以设置
在每次拖动或者快速滑动的时候,你可以通过设置 CenterSnapHelper 让目标 view 自动停在屏幕中央
// work exactly same as LinearSnapHelper.
new CenterSnapHelper().attachToRecyclerView(recyclerView);layoutmanager.setMaxVisibleItemCount(count);layoutmanager.getCurrentPosition()一般情况下,直接使用RecyclerView自带的smoothScrollToPosition就可以了,
但是当无限滚动开启的时候,如果能获取到要滚动到的view建议使用下面的方法。
ScrollHelper.smoothScrollToTargetView(recyclerView, itemViewYouWantScrollTo);请使用 AutoPlayRecyclerView
<com.leochuan.AutoPlayRecyclerView
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:direction="right"
app:timeInterval="1500"/>Gradle:
repositories {
jcenter()
}
dependencies {
compile 'rouchuan.viewpagerlayoutmanager:viewpagerlayoutmanager:2.x.y'
}Maven:
<dependency>
<groupId>rouchuan.viewpagerlayoutmanager</groupId>
<artifactId>viewpagerlayoutmanager</artifactId>
<version>2.x.y</version>
<type>pom</type>
</dependency>使用前请确保每一个view的大小都相同,不然可能会发生不可预料的错误。
你可以通过新建一个Builder来设置各种属性:
new CircleLayoutManager.Builder(context)
.setAngleInterval(mAngle)
.setMaxRemoveAngle(mMaxRemoveAngle)
.setMinRemoveAngle(mMinRemoveAngle)
.setMoveSpeed(mSpeed)
.setRadius(mRadius)
.setReverseLayout(true)
.build();或者只是简单的调用一下预设的构造方法:
new CircleLayoutManager(context);Apache-2.0. 详情见 LICENSE








