yanzm / loopviewpager Goto Github PK
View Code? Open in Web Editor NEWLoopViewPager for Android
License: Apache License 2.0
LoopViewPager for Android
License: Apache License 2.0
Please mark where you change the code
How to scroll from last to first by code
Thanks for your LoopViewPager. It works very well with the old version. But I meet 2 issues with the new one. 1. I use FragmentStatePagerAdapter and 3 Fragments in my project. It will destroy the 1st Fragment and create a new one at the 4th page when scrolled to the 3rd page. (In the old LoopViewPager case, the 1st Fragment will not be destroyed but just appear at the 4th page.) 2. There's a bug with the PageTransformer when scrolling 3rd page to 4th page as the function transformPage(View view, float position) may pass in a wrong view or position, leading to a wrong transition effect.
It would be very helpful if you could upload your maven artifacts to Maven Central etc, so that the others can easily use your library in other projects.
from right to left has question when list size<6
Could you add a PageTransformer for this LoopViewPaper ?
I'm having this issue in Splunk with users but I can't reproduce it with my devices.
This trace is not from my app code so maybe there is something wrong with this library.
This is all the information I'm receiving:
File: PhoneWindow.java:2410
1 java.lang.IllegalArgumentException: pointerIndex out of range
1 at android.view.MotionEvent.nativeGetAxisValue(Native Method)
2 at android.view.MotionEvent.getX(MotionEvent.java:2072)
3 at android.support.v4.view.LoopViewPager.onInterceptTouchEvent(LoopViewPager.java:2102)
4 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2109)
5 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
6 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2255)
7 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
8 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2255)
9 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
10 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2255)
11 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
12 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2255)
13 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
14 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2255)
15 at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2554)
16 at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2255)
17 at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2410)
18 at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1744)
19 at android.app.Activity.dispatchTouchEvent(Activity.java:2805)
20 at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2371)
21 at android.view.View.dispatchPointerEvent(View.java:9597)
22 at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4234)
23 at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4100)
24 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
25 at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
26 at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
27 at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3791)
28 at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
29 at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3848)
30 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
31 at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3699)
32 at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3665)
33 at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3673)
34 at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3646)
35 at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5926)
36 at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5900)
37 at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5861)
38 at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6029)
39 at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
40 at android.os.MessageQueue.nativePollOnce(Native Method)
41 at android.os.MessageQueue.next(MessageQueue.java:331)
42 at android.os.Looper.loop(Looper.java:218)
43 at android.app.ActivityThread.main(ActivityThread.java:5526)
44 at java.lang.reflect.Method.invoke(Native Method)
45 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
46 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.