explaingit

scwang90/smartrefreshlayout

25,155JavaAudience · developerComplexity · 2/5StaleLicenseSetup · easy

TLDR

Android library that adds pull-to-refresh and load-more gestures to lists and feeds with automatic detection of scrollable views and pre-built animated indicators.

Mindmap

mindmap
  root((repo))
    What it does
      Pull-to-refresh
      Load-more scrolling
      Animated indicators
    Key features
      Nested scroll support
      Multi-touch handling
      Custom animations
      Pre-built headers
    Use cases
      Feed apps
      Timeline displays
      Paginated lists
    Tech stack
      Java
      Android ViewGroup
      AndroidX

Things people build with this

USE CASE 1

Build a social media feed app where users pull down to refresh the latest posts.

USE CASE 2

Create a news reader that automatically loads more articles as users scroll to the bottom.

USE CASE 3

Add pull-to-refresh to a messaging app's conversation list with custom loading animations.

USE CASE 4

Implement infinite scroll on a product listing page with nested scrollable content.

Tech stack

JavaAndroidAndroidXRecyclerView

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial. Keep the notice and disclose changes to the patent grant.

In plain English

SmartRefreshLayout is an Android library that provides pull-to-refresh and load-more functionality for mobile apps. Pull-to-refresh is the gesture where a user drags a list downward to trigger it to reload its content, and load-more (or infinite scroll) automatically fetches additional items when they reach the bottom of a list. These are extremely common patterns in apps showing feeds, timelines, or paginated data. The problem SmartRefreshLayout solves is that building these interactions from scratch is complex: you need to handle touch events properly, animate a loading indicator, support nested scrollable views (like a list inside a scrollable page), and handle edge cases like multi-touch. SmartRefreshLayout is "smart" because it automatically detects scrollable child views and handles all that complexity. It extends ViewGroup (a core Android layout class) directly for better performance than solutions built on simpler layout classes. The library ships as several separate packages so you only include what you use: the core engine plus whichever header (the animated indicator shown while refreshing) and footer (shown while loading more) you want. It includes dozens of pre-built animated headers in different visual styles. It supports AndroidX (the modern Android support library), multi-touch, secondary refresh levels, and custom animations. You would add it to an Android Java project whenever you need pull-to-refresh on a list, RecyclerView, or WebView.

Copy-paste prompts

Prompt 1
Show me how to integrate SmartRefreshLayout into an Android RecyclerView to add pull-to-refresh functionality.
Prompt 2
How do I customize the loading header animation in SmartRefreshLayout to match my app's design?
Prompt 3
Set up SmartRefreshLayout with both pull-to-refresh and load-more on a nested scrollable layout.
Prompt 4
What are the best practices for handling multi-touch gestures with SmartRefreshLayout in a production app?
Prompt 5
How do I implement a secondary refresh level in SmartRefreshLayout for advanced refresh actions?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.