LzViewPager是一个基于support-v4包中ViewPager进行扩展的控件,目的是为了做到官方ViewPager所不支持的功能操作,后续会持续扩展。
- 支持修改缓存页面为0,即:可不使用ViewPager缓存。
- 支持修改ViewPager翻页时长,可动态恢复默认速度。
- 未完待续...
implementation 'com.lizardkits.lzviewpager:library:1.0.0'
因为基于官方ViewPager扩展,所以,你完全可以当它是官方的ViewPager来使用,基本用法完全相同,以下是LzViewPager与官方ViewPager不同api使用说明:
mLzViewPager.setOffscreenPageLimit(0); // 设置ViewPager缓存页数(0为不缓存)
mLzViewPager.setScrollDuration(100); // 设置ViewPager翻页时长(速度)
mLzViewPager.resetScrollDuration(); // 使用默认翻页速度
- Home: https://lizardkits.github.io/
- Email: [email protected]
- 掘金: https://juejin.im/user/58a53faf5c497d005fa78737
Copyright 2018, GitLqr
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.