Code Monkey home page Code Monkey logo

Comments (8)

leochuan avatar leochuan commented on July 17, 2024

@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.

djnotes avatar djnotes commented on July 17, 2024

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.

leochuan avatar leochuan commented on July 17, 2024

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.

leochuan avatar leochuan commented on July 17, 2024

@jasonMisaq I think it's done. try version 2.0.6

fix by ac76e71

from viewpagerlayoutmanager.

djnotes avatar djnotes commented on July 17, 2024

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.

djnotes avatar djnotes commented on July 17, 2024

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.

leochuan avatar leochuan commented on July 17, 2024

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.

leochuan avatar leochuan commented on July 17, 2024

Try 2.0.7.. I fixed the crash.

from viewpagerlayoutmanager.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.