Giter Site home page Giter Site logo

fast-list's People

Contributors

radoyankov avatar turing-tech 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fast-list's Issues

Library Compatibility

Why Library Compatibility Minimum Android SDK: API level 19?

Will be great get Android SDK: API level 16 Compatibility, if it possible

Cheers!

DiffUtil and possible performance update

In the DiffUtil code

As suggested by a teammate the areItemsTheSame and the areContentsTheSame should probably be reversed, since the compare closure seems more in line with comparing the contents. So it will look like this instead
`

        override fun areItemsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
            return items[oldItemPosition] == newList[newItemPosition]
        }

        override fun areContentsTheSame(oldItemPosition: Int, newItemPosition: Int): Boolean {
            return compare(items[oldItemPosition], newList[newItemPosition])
        }`

Or alternatively for more flexibility, you can change the lambda to have an additional param
compare: (T, T, Boolean)
where the Boolean lets the method know if this is the contentsTheSame check or not

Final comment, could you be making unnecessary copies of the new list
items = newList.toMutableList()
I am not sure if this is needed at all where you can just do
items = newList
Or if if has to be mutable
if (newList is MutableList) items = newList else items = newList.toMutableList()

I can send all these changes as a pull request if you like

New features

Hey, your library looks nice, thanks for sharing.
But wanna got more anothers useful features with your library, such as:

  • Item click and item chlid click listeners
  • Header and footer
  • Auto load more
  • Item grouping
  • Showing a custom view when adapter is empty
  • Draggable and swipeable item
    etc.
    Cheers!

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.