MultiSnapRecyclerView
介绍:
一个一次划动指定数目item的RecyclerView,类似play store首页app展示的效果。
运行效果:
使用说明:
Gradle
dependencies {
compile 'com.github.takusemba:multisnaprecyclerview:1.0.2'
}
Use MultiSnapRecyclerView in your xml file.
<com.takusemba.multisnaprecyclerview.MultiSnapRecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:msrv_gravity="start" or center, end
app:msrv_snap_count="2" /> items to scroll over
and simply set a layout manager.
LinearLayoutManager layoutManager = new LinearLayoutManager(this);
multiSnapRecyclerView.setLayoutManager(layoutManager);
multiSnapRecyclerView.setAdapter(adapter);
multiSnapRecyclerView.setOnSnapListener(new OnSnapListener() {
@Override
public void snapped() {
// do something
}
});
已下载
0