Build an Android app with a scrollable list of items without writing ViewHolder boilerplate from scratch.
Create a chat-style list where sent and received messages use different row layouts with MultiItemTypeAdapter.
Add a load-more indicator at the bottom of a RecyclerView that triggers when the user scrolls to the end.
Show a placeholder view automatically when a list has no data using EmptyWrapper.
Add as a Gradle dependency to your Android project, no additional configuration required.
base-adapter is a Java library for Android that reduces the repetitive code required when displaying lists of items in an app. In Android development, showing a list of data requires writing an adapter: a piece of code that connects a data source to the list view on screen. This library provides pre-built adapters so developers can skip writing that boilerplate themselves. The library covers three common Android list components: ListView, RecyclerView, and GridView. For a basic list, you extend a class called CommonAdapter and fill in a single method that describes how each item should look. The library handles ViewHolder creation and recycling internally, which are implementation details that Android developers otherwise need to manage by hand. For lists where different rows have different layouts (a chat conversation, for example, where sent and received messages look different), the library provides MultiItemTypeAdapter. Each item layout gets its own delegate class that defines which layout to use and how to populate it with data. Beyond the core adapters, the library includes wrapper classes that add common list behaviors by wrapping an existing adapter. HeaderAndFooterWrapper adds fixed rows at the top and bottom of a list. LoadMoreWrapper adds a loading indicator at the bottom and a callback for when the user scrolls to the end. EmptyWrapper shows a placeholder view when the list has no data. These wrappers can be chained together. The README is written in Chinese. The library is a dependency for Android projects and available via Gradle. It targets developers who want to avoid writing standard adapter and ViewHolder patterns from scratch.
← hongyangandroid on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.