This library provides Easy Android ListView Adapters(EasyListAdapter & EasyCursorAdapter) which makes designing Multi-Row-Type ListView very simple & cleaner, It also provides many useful features for ListView.

Overview

EasyListViewAdapters

Android Arsenal

Whenever you want to display custom items in listview, then only way to achieve this is to implement your own subclass of BaseAdapter, handle all rendering, recycling, click handling ,data browsing youself in getView() method. It becomes very messy as number of rows increase in your adapter, Making your code very messy & non-reusable. This library allows you to make Modular classes which will help you to introduce new row type easily.

This library is designed on [ViewHolder] (http://developer.android.com/training/improving-layouts/smooth-scrolling.html#ViewHolder) design pattern, it provides an easier way of linking multiple type rows and their underlying data. The EasyAdapters will do most of tedious work for you & all you have to do is create your small modular classes & link them together.

Looking for GridView like card support within your ListView (with added capabilities), check GridListViewAdapters.

Features

  • Easier than implementing your own Adapter (ie handling BaseAdaper#getView).Very Easier to provide multi-row support.
  • Library takes care of recycling all views, that ensures performance & helps your list view scroll smoothly.
  • Cleaner code. By keeping different RowViewSetter classes for different row-types makes your code easy to manage & easy to reuse.
  • No data browsing, Library takes care of browsing data through data-structure when View is being drawn or event occurs so that Users does not have to look for their data to take actions.
  • Just by passing correct row-types library will Auto-map your data-types to row-types to render views.
  • Row views can be created by using XML or Java (doesn't restrict to XML-Only Approach).
  • Load More callbacks can be registered to implement paginatation support to your list.
  • Handling children viewclicks, you can also register for Children(present inside your rows) view click events. All these Views are registered with single OnClickListner so that this mechanism is very memory efficient when click event occurs users you gets clickedChildView, rowData,int eventId as callback params.

Adding to your project using gradle

repositories {
    maven {
        url "https://dl.bintray.com/birajpatel/easylistviewadapters/"
    }
}
compile 'com.birin:easylistviewadapters:1.0.0'

Compatibility

  • Library : API 4+(DONUT)
  • LibrarySample : API 11+(HONEYCOMB)

Supported Data-types

  • EasyListAdapter : works with java.util.List of data.
  • EasyCursorAdapter : works with android.database.Cursor

Note : EasyCursorAdapter doesn't provide any mechanism to requery attached Cursor (Like traditional CursorAdapter), This behaviour is intentionally omitted as it has been deprecated from Android Sources as well.Instead use CursorLoader Mechanism.

Using EasyListAdapter

Check Quick-Usage-Guide

Using EasyCursorAdapter

Check Quick-Usage-Guide

Sample-App screenshots

EasyListAdapter EasyCursorAdapter Demo Screen

How to understand Sample-App

Progaurd

No need to add any extra config.

Debugging

See the Debugging Exceptions to know about all Exceptions thrown by library & how to fix them.

License

Copyright 2014-present Biraj Patel

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You might also like...
Android library to auto-play/pause videos from url in recyclerview.
Android library to auto-play/pause videos from url in recyclerview.

AutoplayVideos Show some ❤️ and star the repo to support the project This library is created with the purpose to implement recyclerview with videos ea

:page_with_curl: [Android Library] Giving powers to RecyclerView
:page_with_curl: [Android Library] Giving powers to RecyclerView

Android library that provides most common functions around recycler-view like Swipe to dismiss, Drag and Drop, Divider in the ui, events for when item

Android library for the adapter view (RecyclerView, ViewPager, ViewPager2)
Android library for the adapter view (RecyclerView, ViewPager, ViewPager2)

Antonio Android library for the adapter view (RecyclerView, ViewPager, ViewPager2) Free from implementation of the adapter's boilerplate code ! Reuse

Open source routing engine for OpenStreetMap. Use it as Java library or server.
Open source routing engine for OpenStreetMap. Use it as Java library or server.

GraphHopper Routing Engine GraphHopper is a fast and memory efficient Java routing engine, released under Apache License 2.0. By default it uses OpenS

A library to make a mosaic with a preview of multiple images
A library to make a mosaic with a preview of multiple images

Preview Image Collection Introduction Preview Image Collection is a library to draw a collage with a number of images like facebook preview album Inst

Simplify Adapter creation for your Android ListViews.

FunDapter takes the pain and hassle out of creating a new Adapter class for each ListView you have in your Android app. It is a new approach to custom

The powerfull Diff Util in Android Recycler View

DiffUtil The powerfull Diff Util in Android Recycler View What is RecyclerView ? RecyclerView is flexible and efficient version of ListView. It is an

This library provides GridAdapters(ListGridAdapter & CursorGridAdapter) which enable you to bind your data in grid card fashion within android.widget.ListView, Also provides many other features related to GridListView.
This library provides GridAdapters(ListGridAdapter & CursorGridAdapter) which enable you to bind your data in grid card fashion within android.widget.ListView, Also provides many other features related to GridListView.

GridListViewAdapters This libarary enables you to implement GridView like card layout within ListView with added capabilites like Paginations, Additio

A library with many useful and easy-to-use features

This library was made as a replacement for qLib and in the future cubed. These 2 plugins are hard to get you hands on and one of them has many outdated methods so this is a more modern version of those things

A list of most useful resources for designing android apps such as all material colors and dimens, 180 Gradient background + html, social, flat, fluent, metro colors.

Timer UI Login UI Fitness UI Material-Resources-Library A list of most useful resources for designing android apps such as all material colors and dim

Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner
Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner

Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner, detect and mitigate possible security issues, and allow us to write rules around best practices and usage as necessary in the future

Sample project that shows an approach for designing a multi-module architecture for Jetpack Compose Android applications.
Sample project that shows an approach for designing a multi-module architecture for Jetpack Compose Android applications.

Compose Multi-Module Architecture Sample Sample project that shows an approach for designing a multi-module architecture for Jetpack Compose Android a

This is a project designed to help controlling Android MediaPlayer class. It makes it easier to use MediaPlayer ListView and RecyclerView. Also it tracks the most visible item in scrolling list. When new item in the list become the most visible, this library gives an API to track it. Android SegmentedControl + multi row support
Android SegmentedControl + multi row support

Android SegmentedControl + multi row support + multi selection minSdk API 14+ Demo App, Play store link Or try demo App online ! Segmented control for

A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.
A RecyclerView(advanced and flexible version of ListView in Android) with refreshing,loading more,animation and many other features.

UltimateRecyclerView Master branch: Dev branch: Project website:https://github.com/cymcsg/UltimateRecyclerView Description UltimateRecyclerView is a R

Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span
Android ListView that mimics a GridView with asymmetric items. Supports items with row span and column span

AsymmetricGridView An Android custom ListView that implements multiple columns and variable sized elements. Please note that this is currently in a pr

Adapter Kit is a set of useful adapters for Android.
Adapter Kit is a set of useful adapters for Android.

Adapter Kit Adapter Kit is a set of useful adapters for Android. The kit currently includes, Instant Adapter Instant Cursor Adapter Simple Section Ada

A tool that enables advanced features through adb installing and uninstalling apps like wildcards and multi device support. Useful if you want to clean your test device from all company apks or install a lot of apks in one go.  Written in Java so it should run on your platform. A tool that enables advanced features through adb installing and uninstalling apps like wildcards and multi device support. Useful if you want to clean your test device from all company apks or install a lot of apks in one go.  Written in Java so it should run on your platform.
Comments
  • Application specific R import in com.birin.easylistviewadapters.utils.ChildViewsClickHandler

    Application specific R import in com.birin.easylistviewadapters.utils.ChildViewsClickHandler

    After importing via the repo I get:

    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/birin/easylistviewadapters/R$string;

    The build script does not appear to successfully generate the R.java file.

    After importing manually as a package I was able to get further information on this.

    File com.birin.easylistviewadapters.utils.ChildViewsClickHandler contains:

    import com.birin.easylistviewadapters.R;

    Which means importing via Gradle will cause an error (at least when the child on click handler functionality is used). It appears to require this import for

    private static int TAG_VIEW_POSITION = R.string.key_view_position;
    private static int TAG_CLICK_EVENT_ID = R.string.key_click_event_id;
    

    When setting these to 0 I get:

    The key must be an application-specific resource id.

    Caused by the setTag line in the last method:

      private static void tagIntValueToView(View view, int key, int value) {
            if (null != view) {
                view.setTag(key, value);
            }
        }
    

    http://stackoverflow.com/questions/2859574/the-key-must-be-an-application-specific-resource-id seems to suggest no work around, an easy fix is to add as a package and change the import line and add https://github.com/birajpatel/EasyListViewAdapters/blob/master/EasyListViewAdapters/easylistviewadapters/src/main/res/values/dummy_ids.xml .

    I feel it should be importable via Gradle somehow, perhaps the user could supply these values in a higher class? I think the best solution would be for the build script could be built to successfully include R.java. (https://github.com/rey5137/material is an example library that achieves this) After digging around I feel this is easier for someone who is more familiar with the build script to fix so I just thought I'd notify you guys in the hopes you keep up the great work! :)

    opened by PulfordJ 5
Owner
Biraj Patel
Android Engineer at Spotify
Biraj Patel
Adapter Kit is a set of useful adapters for Android.

Adapter Kit Adapter Kit is a set of useful adapters for Android. The kit currently includes, Instant Adapter Instant Cursor Adapter Simple Section Ada

Ragunath Jawahar 368 Nov 25, 2022
Renderers is an Android library created to avoid all the boilerplate needed to use a RecyclerView/ListView with adapters.

Renderers Renderers is an Android library created to avoid all the RecyclerView/Adapter boilerplate needed to create a list/grid of data in your app a

Pedro Vicente Gómez Sánchez 1.2k Nov 19, 2022
[] Easy Adapters library for Android

Deprecated Due to the growing use of the RecyclerView and the RecyclerView.Adapter provided adapter class, Easy-Adapter is now deprecated. Whilst the

ribot 425 Nov 25, 2022
Generate data-view-binding adapters of android recycler view.

Items 这个库可以为 Android 的 RecyclerView 生成基于 Data-View-Binding 的 Adapter。 对比其他一些类似的开源库,它有以下的一些优势: 更好的拓展性。这个库不需要你继承特定的 Adapter 或 ViewHolder 类,你可以继承任何第三方提供的

nekocode 253 Nov 11, 2022
Just like instant coffee, saves 78% of your time on Android's Custom Adapters.

Notice Instant Adapter is now part of an even more awesome Adapter Kit project! Instant Adapter Just like instant coffee, saves 78%* of your time on A

Ragunath Jawahar 232 Nov 25, 2022
The bullet proof, fast and easy to use adapter library, which minimizes developing time to a fraction...

FastAdapter The FastAdapter is here to simplify creating adapters for RecyclerViews. Don't worry about the adapter anymore. Just write the logic for h

Mike Penz 3.7k Jan 8, 2023
Android - A ListView adapter with support for multiple choice modal selection

MultiChoiceAdapter MultiChoiceAdapter is an implementation of ListAdapter which adds support for modal multiple choice selection as in the native Gmai

Manuel Peinado Gallego 855 Nov 11, 2022
Small, smart and generic adapter for recycler view with easy and advanced data to ViewHolder binding.

smart-recycler-adapter Never code any boilerplate RecyclerAdapter again! This library will make it easy and painless to map your data item with a targ

Manne Öhlund 405 Dec 30, 2022
Vector map library and writer - running on Android and Desktop.

Mapsforge See the integration guide and changelog. And read through how to contribute guidelines. If you have any questions or problems, don't hesitat

mapsforge 1k Jan 2, 2023
Epoxy is an Android library for building complex screens in a RecyclerView

Epoxy Epoxy is an Android library for building complex screens in a RecyclerView. Models are automatically generated from custom views or databinding

Airbnb 8.1k Jan 4, 2023