vganin / dpad-aware-recycler-view Goto Github PK
View Code? Open in Web Editor NEWRecyclerView extension that highly cares about D-pad
License: Apache License 2.0
RecyclerView extension that highly cares about D-pad
License: Apache License 2.0
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.
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);
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)
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.
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.
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.