Comments (4)
I am considering this API,but i really think that official ViewPager's api is a little bad.
You can do same action like this in 'onScroll' block :
int width = mRecyclerView.getChildAt(0).getWidth();
int padding = (mRecyclerView.getWidth() - width) / 2;
View curView = ViewUtils.getCenterXChild(mRecyclerView);
if(curView!=null) {
int offset = padding - curView.getLeft();
// if scroll left , offset > 0 ; scroll right ,offset < 0
}
from recyclerviewpager.
I think this is important API,i will add it next version.if you have done this, welcome to send PR.
from recyclerviewpager.
Very very sorry for not responding at all. Been busy, but I'm gonna be trying this out tonight. If it's successful I'll let you know, however I doubt I'll be able to write it into your code. I'm just not at that level yet, code wise.
from recyclerviewpager.
It's really not so hard. Just have a try. ^_^
from recyclerviewpager.
Related Issues (20)
- 如何支持左滑加载,右滑加载,这二种网络数据加载
- 提示不能除0 HOT 1
- can you support the viewpager for slide listener event? HOT 1
- 使用LoopRecyclerViewPager的时候会数组下标越界
- 1.20是不是挂了 HOT 2
- Build for 1.2.0 broken...
- Missing setPageTransformer option
- Issue in SmoothScroller
- AndroidX compatability HOT 1
- setCurrentItem HOT 1
- RecyclerViewPager line 289
- i can't resolve implementation 'com.github.lsjwzh.RecyclerViewPager:lib:v1.2.0@aar' HOT 12
- Swipe is not smoother
- OnPageChanged in Fragment
- How to use when migrate to AndroidX? HOT 9
- RecyclerViewPager 中嵌套fragment使用
- 翻页速度的问题 HOT 2
- 不维护也别把maven上的包撤了啊。。。
- Failed to resolve: com.github.lsjwzh.RecyclerViewPager:lib:v1.1.2 HOT 1
- item是全屏的时候,经常不能整屏滑动
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from recyclerviewpager.