# hongyangandroid/baseadapter

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/hongyangandroid-baseadapter).**

4,709 stars · 1,193 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/hongyangAndroid/baseAdapter
- awesome-repositories: https://awesome-repositories.com/repository/hongyangandroid-baseadapter.md

## Description

baseAdapter is a generic adapter for Android list views designed to reduce boilerplate code when mapping data collections to layouts. It serves as a bridge between data sources and UI components like RecyclerViews and GridViews, providing a reusable structure for Android list implementations.

The project supports multi-type list adapters that associate specific data model classes with corresponding layout styles and view holders. It also includes a wrapper for injecting custom header and footer views into lists without modifying the original data set.

Additional capabilities cover list state management, including the rendering of conditional empty-state placeholders and the addition of pagination load-more indicators. The framework utilizes view holder-based recycling and automated data binding to synchronize data collections with visual components.

## Tags

### Mobile Development

- [Android List Frameworks](https://awesome-repositories.com/f/mobile-development/android-list-frameworks.md) — Provides a generic framework to simplify the creation of custom list and grid interfaces on Android.
- [RecyclerView Adapter Wrappers](https://awesome-repositories.com/f/mobile-development/recyclerview-adapter-wrappers.md) — Abstracts the complexity of Android RecyclerView adapters to reduce repetitive binding and layout code.
- [Android List Adapter Wrappers](https://awesome-repositories.com/f/mobile-development/android-list-adapter-wrappers.md) — Provides a tool for injecting custom header and footer views into standard Android list components.

### Software Engineering & Architecture

- [Generic Adapter Mappings](https://awesome-repositories.com/f/software-engineering-architecture/abstract-data-types/generic-data-abstractions/generic-adapter-mappings.md) — Uses Java generics to map arbitrary data collections to list views, significantly reducing repetitive adapter boilerplate.
- [Generic UI List Mapping](https://awesome-repositories.com/f/software-engineering-architecture/abstract-data-types/generic-data-abstractions/generic-ui-list-mapping.md) — Converts data collections into list components using a generic structure to remove repetitive adapter boilerplate. ([source](https://github.com/hongyangandroid/baseadapter#readme))
- [UI](https://awesome-repositories.com/f/software-engineering-architecture/data-mappers/ui.md) — Acts as a bridge between data collections and Android UI components with integrated support for empty states and loading indicators.
- [Type-to-Layout Mappings](https://awesome-repositories.com/f/software-engineering-architecture/type-to-layout-mappings.md) — Links specific data model classes to corresponding layout resource IDs to support multiple item styles in a single list.

### User Interface & Experience

- [Multi-Type List Rendering](https://awesome-repositories.com/f/user-interface-experience/algebraic-data-type-layouts/multi-type-list-rendering.md) — Maps diverse data models to multiple distinct layout styles and view holders within a single list component.
- [List Bindings](https://awesome-repositories.com/f/user-interface-experience/data-binding/list-bindings.md) — Connects data collections to list components by automating view holder creation and simplifying view manipulation. ([source](https://github.com/hongyangandroid/baseadapter#readme))
- [Multi-Type List Layouts](https://awesome-repositories.com/f/user-interface-experience/grid-layouts/list-layout-arrangements/multi-type-list-layouts.md) — Manages multiple different view types within a single list to display varied content structures.
- [Model-Driven View Binding](https://awesome-repositories.com/f/user-interface-experience/view-recycling-systems/type-based-item-recycling/model-driven-view-binding.md) — Implements a decoupled binding process that populates views with model properties during the list recycling cycle.
- [Empty State Indicators](https://awesome-repositories.com/f/user-interface-experience/empty-state-indicators.md) — Displays a dedicated placeholder layout to the user when the underlying data set contains no items. ([source](https://github.com/hongyangandroid/baseadapter#readme))
- [Empty State Placeholders](https://awesome-repositories.com/f/user-interface-experience/empty-states/empty-state-actions/empty-state-placeholders.md) — Provides placeholder layouts that automatically appear when the underlying list data source is empty.
- [List State View Management](https://awesome-repositories.com/f/user-interface-experience/list-state-view-management.md) — Manages the display of auxiliary views like empty states, loading indicators, and headers based on list data status.

### Web Development

- [View Holder Patterns](https://awesome-repositories.com/f/web-development/dom-element-manipulators/view-recycling/view-holder-patterns.md) — Caches view references within holder objects to minimize expensive lookup calls during list scrolling.

### Part of an Awesome List

- [Header and Footer Views](https://awesome-repositories.com/f/awesome-lists/devtools/list-views/recyclerview-lists/header-and-footer-views.md) — Wraps the core adapter to inject custom header and footer views that scroll with the list content.
- [List and Grid Components](https://awesome-repositories.com/f/awesome-lists/devtools/list-and-grid-components.md) — Universal adapter for list views.
- [List Components](https://awesome-repositories.com/f/awesome-lists/devtools/list-components.md) — Universal adapter for list views.
- [List Views](https://awesome-repositories.com/f/awesome-lists/devtools/list-views.md) — Android 万能的Adapter
