Comments (8)
@jasonMisaq No available method for supporting navigation now. After google, it said that I need to rewrite the onFocusSearchFailed
method. I will support that in next release.
from viewpagerlayoutmanager.
Is there no way to make the RecyclerView receive such events without rewriting your code? I need this feature very badly. It struck me to use simple RecyclerView instead of ViewPagerLayoutManager, but it does not support infinite scroll.
from viewpagerlayoutmanager.
I am working with it recently, Basically I’ve rewrote all the methods it needs and it works fine except infinite scroll is enabled..Maybe it still needs couple days for me to solve this problem
from viewpagerlayoutmanager.
@jasonMisaq I think it's done. try version 2.0.6
fix by ac76e71
from viewpagerlayoutmanager.
Thanks. Why did you remove CenterScrollListener? Also is there an option to give a certain color or effect to the item in focus or being pressed?
from viewpagerlayoutmanager.
When I select an item with keyboard, I get ArithmeticException:
FATAL EXCEPTION: main
Process: com.zood.mediaplayer, PID: 8753
java.lang.ArithmeticException: divide by zero
at com.leochuan.ViewPagerLayoutManager.getCurrentPosition(ViewPagerLayoutManager.java:746)
at com.leochuan.ViewPagerLayoutManager.onAddFocusables(ViewPagerLayoutManager.java:403)
at android.support.v7.widget.RecyclerView.addFocusables(RecyclerView.java:2581)
at android.view.ViewGroup.addFocusables(ViewGroup.java:1221)
at android.view.ViewGroup.addFocusables(ViewGroup.java:1221)
at android.view.ViewGroup.addFocusables(ViewGroup.java:1221)
at android.view.ViewGroup.addFocusables(ViewGroup.java:1221)
at android.view.ViewGroup.addFocusables(ViewGroup.java:1221)
at android.view.ViewGroup.addFocusables(ViewGroup.java:1221)
at android.view.View.addFocusables(View.java:10465)
at android.view.FocusFinder.findNextFocus(FocusFinder.java:108)
at android.view.FocusFinder.findNextFocus(FocusFinder.java:80)
at android.view.ViewRootImpl.focusSearch(ViewRootImpl.java:6186)
at android.view.ViewRootImpl.leaveTouchMode(ViewRootImpl.java:4088)
at android.view.ViewRootImpl.ensureTouchModeLocally(ViewRootImpl.java:4021)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1710)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1386)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6733)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
from viewpagerlayoutmanager.
CenterScrollListener
was replaced by CenterSnapHelper
It's more smooth, you could use it like new CenterScrollListener().attachToRecyclerView(recyclerView)
You should handle the effect of focused view on your own, like write a selector
and determine the color of all the state.
About the crash..It seems like getItemCount()
returned 0
I could handle it, but if items have been drawn it should not be 0
could you add a break point at line 746 and see why getItemCount()
return 0
?
from viewpagerlayoutmanager.
Try 2.0.7
.. I fixed the crash.
from viewpagerlayoutmanager.
Related Issues (20)
- 滑动到指定位置
- ViewPagerLayoutManager.mOrientation覆盖了父类的LinearLayoutManager.mOrientation
- 能实现每个iten的顶部都是水平的吗
- 如何基于CircleLayoutManager实现椭圆圆弧的效果呢 HOT 4
- How to stop auto scrolling? HOT 1
- ScaleLayoutManager第一次滑动的时候会导致recycleview子布局重现排版
- 如何一次只滑动一个item? HOT 2
- AutoPlayRecyclerView
- 显示多个item时 放大的item左右间距 跟其他item左右间距不一样 - ScaleLayoutManager
- 大于3个item时 放大的item左右间距与其他item左右间距不一样 - ScaleLayoutManager HOT 1
- good job!
- when items are only 3 then why it's scrolls and hide until first visible items rich to end
- 滑动到指定位置调用次数过多会卡死
- LeakCanary内存泄漏
- Big performance issue HOT 1
- CircleScaleLayoutManager
- Infinite status unavailable
- 有iOS的??
- 像小说阅读器那种仿真翻页能实现吗
- 使用PageSnapHelper并没有单页滑动
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 viewpagerlayoutmanager.