如果想要自定义效果请在build.gradle文件中引入:
compile 'rouchuan.viewpagerlayoutmanager:viewpagerlayoutmanager-core:1.2.0'
如果你想用上面提供的效果,请引入(不需要再引用core):
compile 'rouchuan.viewpagerlayoutmanager:viewpagerlayoutmanager-support:1.0.0'
recyclerView.addOnScrollListener(new CenterScrollListener());
与recyclerView相同,默认平滑滚动,调用setSmoothScrollbarEnabled设置。
<android.support.v7.widget.RecyclerView
android:scrollbars="horizontal"
android:id="@+id/recycler"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- 拆分了core与support
- 修复了使用Universal-Image-Loader载入图片会导致跳动到第一项
- 支持在view初始化完成之前对recyclerView进行scrollToPosition
- 优化了布局算法的性能
- 支持无限滚动
- 进一步优化性能
- 添加indicator
- 支持不同大小的子View
- 给support库添加其他效果(长期的课题)
Copyright 2016 shenruochuan
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.