Giter Site home page Giter Site logo

dpad-aware-recycler-view's Introduction

DpadAwareRecyclerView

Collection of useful RecyclerView functionality for D-pad environments.

  • DpadAwareRecyclerView โ€” D-pad friendly extension of RecyclerView
    • Many bugfixes and workarounds for common RecyclerView issues in D-pad environment
    • Floating Drawable selectors with tunable velocity
    • Classic OnItemClickListener and OnItemSelectedListener emulations
    • Classic setSelection() and getSelectedItemPosition() emulations
    • Classic setEnabled() emulation
    • Choose between remembering focus and focus natural flow via setRememberLastFocus() method
  • ExtGridLayoutManager โ€” extension of GridLayoutManager
    • Has Builder implementation for construction
    • Camera offset for selection. E.g. for 0.5 selected view will be centered
    • Circular navigation (jump from last to first element and vice versa)
    • AUTO_FIT support similar to GridView
    • 'Arrow' views (any views really) indicating begin or end is reached
    • It supports wrap_content in axis different from specified as orientation. Calculations are based on item's specified width and length

Attributes

  • foregroundSelector (reference) - drawable resource for foreground floating selector
  • backgroundSelector (reference) - drawable resource for background floating selector
  • selectorVelocity (integer) - selector transition velocity in px/sec. When less or equals to 0, transition duration will always be immediate. Default: 0 px/sec
  • smoothScrolling (boolean) - sets smooth scrolling on or off

Note: you can leave any of these attributes unspecified if you don't want this functionality. Without any of these you should get vanilla RecyclerView behavior (almost).

Example

<net.ganin.darv.DpadAwareRecyclerView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:foregroundSelector="@drawable/selector_item_foreground"
        app:backgroundSelector="@drawable/selector_item_background"
        app:selectorVelocity="1000"
        app:smoothScrolling="true">

To contributors

Feel free to propose additional functionality, bugfixes, documentation enhancements, etc. through pull requests or issues.

General long-term purpose of this library is to become the largest collection of useful functionality and workarounds for TV and other D-pad related devices. So it is appreciated to contribute not only to existing components but to add a new ones that are highly demanded in D-pad environments.

dpad-aware-recycler-view's People

Contributors

kingargyle avatar vganin avatar

Watchers

 avatar

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.