Skip to content

LizardKits/LzViewPager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

Latest Stable Version Min Sdk Version License Author

LzViewPager是一个基于support-v4包中ViewPager进行扩展的控件,目的是为了做到官方ViewPager所不支持的功能操作,后续会持续扩展。

特性

  1. 支持修改缓存页面为0,即:可不使用ViewPager缓存。
  2. 支持修改ViewPager翻页时长,可动态恢复默认速度。
  3. 未完待续...

依赖

implementation 'com.lizardkits.lzviewpager:library:1.0.0'

使用

因为基于官方ViewPager扩展,所以,你完全可以当它是官方的ViewPager来使用,基本用法完全相同,以下是LzViewPager与官方ViewPager不同api使用说明:

1、设置LzViewPgaer缓存页数

mLzViewPager.setOffscreenPageLimit(0); // 设置ViewPager缓存页数(0为不缓存)

2、设置LzViewPgaer翻页时长与恢复

mLzViewPager.setScrollDuration(100); // 设置ViewPager翻页时长(速度)
mLzViewPager.resetScrollDuration(); // 使用默认翻页速度

关于

License

 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.

About

LzViewPager is more powerful than Android ViewPager

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages