Giter Site home page Giter Site logo

dpad-aware-recycler-view's People

Contributors

kingargyle avatar vganin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dpad-aware-recycler-view's Issues

StableIds requires double-tap

When I enable stable IDs I have to tap twice on my dpad to move focus. I should be able to enable stable IDs and one tap should still move the focus.

Request focus

Hi!
Is there any way to focus the Dpad-RecyclerView programatically ?

I tried with:

dpadRecyclerView.scrollToPosition(0);
dpadRecyclerView.profileAttributes.getChildAt(0).requestFocus();
dpadRecyclerView.profileAttributes.setSelection(0);

Null Pointer Exception

The following NPE is being thrown occassionally by some users out in the wild.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.getHitRect(android.graphics.Rect)' on a null object reference
at net.ganin.darv.DpadAwareRecyclerView.requestChildFocusInner(DpadAwareRecyclerView.java:649)
at net.ganin.darv.DpadAwareRecyclerView.onScrollStateChanged(DpadAwareRecyclerView.java:629)
at android.support.v7.widget.RecyclerView.dispatchOnScrollStateChanged(RecyclerView.java:4873)
at android.support.v7.widget.RecyclerView.setScrollState(RecyclerView.java:1467)
at android.support.v7.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5030)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
at android.view.Choreographer.doCallbacks(Choreographer.java:723)
at android.view.Choreographer.doFrame(Choreographer.java:655)
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(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Initial focus

Any way to set initial focus on 0 itemview? When launchign the demo app I must press Down key to enable d-pad interaction and the 5th view get focused.

Need ability to Long Click on an Item

I think I'll have to implement this myself, but I have a need for an onItemLongClick event using this view. I've tried adding items to the view holder but the DPadAwareRecyclerView intercepts the messages first. I think we just need to check to see if a key is repeating, if so, kick off the onItemLongClick listener, otherwise just kick off the Click Listener.

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.