百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Y

YViewPagerDemo

> 编程语言
开源

[停止维护] YViewPager,支持横向和纵向,基于 support.v4.view.ViewPager

357 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

[停止维护] YViewPager,支持横向和纵向,基于 support.v4.view.ViewPager

   由于个人原因,该仓库停止维护/For personal reasons, this repository stopped maintenance

YViewPagerDemo

YViewPager,support horizontal and vertical,based on support.v4.view.ViewPager

中文版点这里

Usage

Gradle

compile 'cn.youngkaaa:yviewpager:0.4'

Maven


  cn.youngkaaa
  yviewpager
  0.4
  pom

Intro

The YViewPager is modified from the official support.v4.view.ViewPager,which support the direction of horizontal and vertical(new direction).You can use this lib just like the official support.v4.view.ViewPager,include the features of setPageTransformer()、addOnPageChangeListener()、setOffscreenPageLimit() and so on,And also supported the TabLayout.

Feature

Direction

On the base of the support.v4.view.ViewPager,add the property of direction. You can use it by:

xml

just like the above xml.you can add the property app:orientation in YViewPager tag, the value of this property is horizontal and vertical.

java code

mViewPager.setDirection(YViewPager.VERTICAL);

mViewPager.setDirection(YViewPager.HORIZONTAL);

you can change the direction by calling the YViewPager.setDirection()。

Tip:It's not recommended that change the direction when your application is running,which include a inflated YViewPager,because at this time the YViewPager may included the Fragments,which may has the deeply view hierarchy,and when you call the setDriection() may invaliate the layout,so may cause the application ANR or bad layout.but it's just not recommended,not unsupport!

Circulatory

in v1.2,add the property of circulatory.you can use it by:

xml

yeah,you just need to add one line.

java

sorry,the property of circulatory do not support to change by using java code.

Version

v0.4

see here  (2017-4-18)

v0.3

minSdkVersion to 14 (2017-4-08)

v0.2

add the circulatory property,which support the direction of horizontal and vertical (2017-2-26)

v0.1

support the direction of vertical and horizontal(2017-2-22)

Finally

Because the FragmentPagerAdapter 、FragmentStatePagerAdapter and PagerAdapter has some methods are not br called in YViewPager,so I copy the code in this lib named YFragmentPagerAdapter、YFragmentStatePagerAdapter and YPagerAdapter,you can choose the YxxxxxAdapter in this lib which you needed!

The running screenshot:

v0.1

v0.2

If you think this lib help you,you can give me a star to encourage me! thanks a lot

License

Copyright 2017 youngkaaa

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.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Javaverticalviewpagerviewpagerviewpagers

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言