Code Monkey home page Code Monkey logo

xmartrecyclerview's Introduction

XmartRecyclerView

License: MIT

A smart, simple and fast RecyclerView library, made with ❤️ by XMARTLABS

Overview

XmartRecyclerView is a library created to make your life easier when using a RecyclerView. But it doesn't stop there. This library not only makes working with it a piece of cake, it also offers top-notch performance and a set of very interesting features that you will surely love.

Contents

Loading On-Demand

XmartRecyclerView provides a way to set a threshold, so that when it's reached, it automatically loads the next page of the RecyclerView. You only need to set that threshold, and decide what to load in the next page. It's as easy as that.

XmartAdapter

We know it's a struggle having to deal with duplicate items in a RecyclerView. That's why we made our adapter really xmart. After you define when two objects are the actually same object, and when two objects have the same content, our adapter will automatically handle every addition to the list: if the item would be a duplicate, it just ignores its addition and keeps on working. The library makes use of Google's DiffUtil to be able to do this.

Empty View Support

One of the not-so-minor problems when working with RecyclerViews is what to do when the list is simply blank. We thought of that, so we offer what we like to call Empty View Support. Just decide an appropiate layout that suits your needs, and set it as the empty view. XmartRecyclerView will handle the rest (yes, even if an item is removed and the list suddenly becomes empty, or if the list was empty but it now has an item, we will make that happen too).

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.
  • If you found a bug check older issues before submitting a new one.
  • If you need help or would like to ask a general question, use StackOverflow. (Tag xmart-recyclerview).

Before contributing, please check the CONTRIBUTING file.

Donate to XmartRecyclerView

So we can make XmartRecyclerView even better!

Changelog

The changelog for this project can be found in the CHANGELOG file.

xmartrecyclerview's People

Contributors

bryant1410 avatar f7deleon avatar ferraribruno avatar mirland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

xmartrecyclerview's Issues

InitializeEmptyView is not working properly if the root view has multiples empty views with the same id.

initializeEmptyView is not working fine if the root view has multiples empty views with the same id.

We should use something like:

    @Nullable
    private View findEmptyViewById(@Nullable View view, @IdRes int emptyViewId) {
        if (view == null) {
            return null;
        }

        ViewParent parent = view.getParent();
        if (parent != null && parent instanceof ViewGroup) {
            View emptyView = ((ViewGroup) parent).findViewById(emptyViewId);
            if (emptyView == null) {
                return findEmptyViewById((View) parent, emptyViewId);
            } else {
                return emptyView;
            }
        }
        return null;
    }

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.