Skip to content
CAI
Software that uses CAICheck a score

scwang90/SmartRefreshLayout

50.1

Adequate · 24 September 2026

22.4k

lines of production code

Java

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is an Android library for implementing pull-to-refresh and infinite scroll interactions. It provides a modular architecture that separates the core layout logic from specific header and footer implementations, allowing developers to easily integrate various visual styles and animations. The library supports a wide range of header and footer components, including classic, material, and two-level refresh headers, as well as animated footers, all configurable through XML attributes and Java APIs.

How it got here

2017 — Initial project release and architecture definition

7 changes.

The period marks the initial release of the SmartRefreshLayout project, establishing a multi-module Gradle structure with core components for pull-to-refresh functionality. It includes the introduction of various header and footer implementations, along with comprehensive documentation and UML diagrams defining the library's architecture.

2018–2024 — Modular architecture and UI component expansion

12 changes.

The project underwent a significant architectural shift by introducing a modular kernel with new interfaces for headers and footers, enabling a more extensible design. This period also saw the addition of numerous new visual components, including various header and footer styles, as well as drawable utilities and demo activities to showcase the library's capabilities.

Features

Add FalsifyHeader and FalsifyFooter placeholder components

Introduced new placeholder components, FalsifyHeader and FalsifyFooter, which serve as invisible fillers for the refresh layout. These components allow developers to reserve space for headers and footers that are positioned outside the RefreshLayout container, ensuring correct layout behavior without displaying any visual content during runtime. The implementation includes the core Java classes, Android manifest, and associated test files.

refresh-header-falsify · high confidence

Add TwoLevelHeader component for two-level pull-to-refresh

The library now includes a new \TwoLevelHeader\ component that enables a two-level refresh interaction. Users can configure the header's behavior via XML attributes such as \srlMaxRate\, \srlFloorRate\, and \srlEnableTwoLevel\. The component supports a secondary 'two-level' state triggered by a bottom pull-up gesture, allowing for more complex header interactions within the refresh layout.

refresh-header-two-level · high confidence

Add demo activities for SmartRefreshLayout usage

The app module now includes a comprehensive set of demo activities demonstrating how to use the SmartRefreshLayout library. These include examples for basic refresh/load more, custom headers and footers, XML-based configuration, global default configurations, listener callbacks, internationalization, nested layouts, overscroll effects, and SnapHelper integration. The main application class (App) is also updated to set global default refresh headers and footers, configuring the ClassicsHeader and ClassicsFooter as the default styles for the entire application.

app/src/main/java · high confidence

Add new refresh header components

The refresh-header module now includes several new header implementations: BezierCircleHeader, DeliveryHeader, DropBoxHeader, FlyRefreshHeader, FunGameBattleCityHeader, FunGameHitBlockHeader, and PhoenixHeader. These headers provide various visual effects and animations for pull-to-refresh and load-more interactions, including geometric shapes, game-themed animations, and custom drawables.

refresh-header · high confidence

Added UML class diagram and documentation for the SmartRefreshLayout architecture

Added a UML class diagram (UMLRefreshLayout.classdiagram) that visualizes the relationships between the core interfaces (RefreshLayout, RefreshHeader, RefreshFooter, RefreshContent) and their implementations (ClassicsHeader, BezierRadarHeader, ClassicsFooter, BallPulseFooter, etc.). Additionally, new documentation files were added to the 'art' directory, including md\_custom.md (explaining custom Header/Footer implementation), md\_donationlist.md (listing donors), md\_faq.md (frequently asked questions), md\_multitouch.md (multi-touch support), md\_property.md (code examples and properties), md\_smart.md (smart layout features), and md\_update.md (version history).

art · high confidence

Initial project release with documentation and build scripts

The repository was initialized with the core project files, including the primary README documentation (in both Chinese and English) and essential build scripts (gradlew, gradlew.bat, and method-counting batch files). This establishes the project's public-facing documentation and standard Gradle wrapper for building the library.

(repo-wide) · high confidence

Initial release of the SmartRefreshFooter component

The refresh-footer module is introduced as a new library component, providing the foundational structure for a footer-based pull-to-refresh feature. This includes the Android manifest, resource definitions (attributes and strings), ProGuard rules, and both local and instrumented unit tests to verify the module's basic configuration and functionality.

refresh-footer · high confidence

Initial release of the refresh-layout component

The refresh-layout module is introduced as a new component, providing the core Android library structure including the manifest, ProGuard rules, and initial unit and instrumentation test classes.

refresh-layout · high confidence

Introduce ClassicsFooter component for pull-to-load-more

The \refresh-footer-classics\ module now includes the \ClassicsFooter\ component, which provides a classic-style footer for pull-to-load-more interactions. This new component features a progress indicator, an arrow icon, and status text (e.g., 'Pull Up To Load More', 'Loading...') that updates based on the user's scroll state. The implementation includes the necessary layout files, string resources for internationalization, and unit/instrumentation tests to verify the component's behavior.

refresh-footer-classics · high confidence

Introduce MaterialHeader as a standalone library module

The Material theme pull-to-refresh header is now packaged as an independent module (refresh-header-material), containing its own manifest, ProGuard rules, and test scaffolding. This separation allows the Material header to be included or excluded from the main library, giving users the option to use the Material design refresh header independently of the core layout library.

refresh-header-material · high confidence

Introduce PaintDrawable and ProgressDrawable components

The refresh-drawable-paint module now includes new drawable classes: an abstract PaintDrawable that manages a Paint object for color and alpha settings, and a concrete ProgressDrawable that renders a rotating, animated progress indicator using ValueAnimator. This adds new visual components for displaying animated states in the UI.

refresh-drawable-paint · high confidence

Introduce new refresh kernel architecture and interfaces

The refresh-layout-kernel module has been restructured with a new internal API. New interfaces such as RefreshComponent, RefreshContent, RefreshHeader, RefreshFooter, and RefreshKernel have been introduced to define the behavior of refresh headers and footers. The main SmartRefreshLayout class now implements the RefreshLayout interface, which provides a comprehensive set of methods for configuring header and footer dimensions, drag rates, trigger rates, and animation durations. Additionally, listener interfaces like OnRefreshListener, OnLoadMoreListener, and OnStateChangedListener are now part of the kernel's public API, allowing for more granular control over refresh and load-more states. This change represents a significant architectural shift, moving towards a more modular and extensible design for handling pull-to-refresh and infinite scroll behaviors.

refresh-layout-kernel · high confidence

Introduction of the ClassicsHeader component for pull-to-refresh UI

The \refresh-header-classics\ module now provides a complete \ClassicsHeader\ implementation, featuring a classic header layout with an arrow, progress indicator, title text, and last-update timestamp. Users can customize the header's appearance and behavior through XML attributes (e.g., colors, text, spinner style) and the component supports both English and Chinese localizations for standard refresh states.

refresh-header-classics · high confidence

New PathsDrawable and PathsView components for rendering SVG-style vector paths

Added new Android components for rendering vector paths: a \PathsDrawable\ that parses and draws SVG-style path data with scaling and color support, and a corresponding \PathsView\ for use in layouts. The implementation includes a \PathParser\ to convert path data strings into Android \Path\ objects, enabling the display of complex vector graphics. Additionally, an instrumented test \ExampleInstrumentedTest\ was added to verify the Android environment setup.

refresh-drawable-path · high confidence

New pull-to-refresh animations: BallPulseFooter and BezierRadarHeader

Users can now apply two new visual styles to the pull-to-refresh component: a 'BallPulse' animation for the footer and a 'BezierRadar' animation for the header. These new modules provide distinct visual feedback during loading states, with the header featuring a radar-style wave and dot animation, and the footer offering a pulsing ball effect.

refresh-footer-ball, refresh-header-radar · high confidence

Behavioural changes

Added ProGuard configuration for code obfuscation

The app module now includes a ProGuard rules file (proguard-rules.pro) that configures code obfuscation and optimization. This ensures that specific classes and packages, such as those from com.github.mmin18, android.support.v8.renderscript, com.wang.avi, and com.scwang.refresh, are preserved during the build process to prevent runtime issues caused by aggressive minification.

app · medium confidence

Test coverage

Added initial unit and instrumented test scaffolding

Added new test files for the app: an instrumented test (ExampleInstrumentedTest) that verifies the application context package name, and a local unit test (ExampleUnitTest) that confirms basic arithmetic operations. These additions provide a baseline for automated testing in the Android environment.

app/src/androidTest · high confidence

Dependencies

Initial project structure and dependency configuration

The project has been initialized with a multi-module Gradle structure for the SmartRefreshLayout library. The configuration sets the Android compile and target SDK to 34, with a minimum SDK of 21. The app module includes dependencies for AndroidX components (CardView, ConstraintLayout, Material Design 1.12.0) and various third-party libraries such as Glide, Gson, and Flexbox. The library modules (e.g., refresh-layout, refresh-header-classics) are configured to depend on the core kernel and other header/footer implementations, all versioned as 3.0.0-alpha.

(dependencies) · high confidence

Updated Gradle wrapper to version 7.5.1

The project's Gradle wrapper has been updated to use Gradle 7.5.1. This ensures the build environment uses a specific, stable version of the Gradle build tool, which may include performance improvements, bug fixes, and compatibility updates for AndroidX and other dependencies.

gradle · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 49 → 50 (+1.3)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 73 → 83 (+10.3)
  • Architecture 100 → 97 (-2.8)
  • Maturity 54 → 54 (+0.0)
  • Readiness 26 → 27 (+0.8)
  • Security 97 → 92 (-5.0)

Resolved (65)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/practice/QQBrowserPracticeActivity.java)
  • Duplicated block (10 lines × 2) (refresh-drawable-path/src/main/java/com/scwang/smart/drawable/path/PathParser.java)
  • Duplicated block (10 lines × 2) (refresh-drawable-path/src/main/java/com/scwang/smart/drawable/path/PathParser.java)
  • Duplicated block (11 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/PhoenixStyleActivity.java)
  • Duplicated block (11 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/example/EmptyLayoutExampleFragment.java)
  • Duplicated block (11 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/practice/SecondFloorPracticeFragment.java)
  • Duplicated block (11 lines × 3) (app/src/main/java/com/scwang/refresh/layout/activity/style/BezierCircleStyleActivity.java)
  • Duplicated block (11 lines × 8) (app/src/main/java/com/scwang/refresh/layout/activity/style/BezierCircleStyleActivity.java)
  • Duplicated block (12 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/example/SnapHelperExampleActivity.java)
  • Duplicated block (12 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/PhoenixStyleActivity.java)
  • Duplicated block (13 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/PhoenixStyleActivity.java)
  • Duplicated block (14 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/example/AssignDefaultExampleActivity.java)
  • Duplicated block (15 lines × 3) (app/src/main/java/com/scwang/refresh/layout/activity/example/AssignCodeExampleActivity.java)
  • Duplicated block (21 lines × 2) (refresh-drawable-path/src/main/java/com/scwang/smart/drawable/path/PathParser.java)
  • Duplicated block (5 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/DeliveryStyleActivity.java)
  • Duplicated block (5 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/StoreHouseStyleActivity.java)
  • Duplicated block (5 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/StoreHouseStyleActivity.java)
  • Duplicated block (5 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/example/BottomSheetExampleFragment.java)
  • …and 45 more

New (79)

  • ClassTooLong: PathParser (refresh-drawable-path/src/main/java/com/scwang/smart/drawable/path/PathParser.java)
  • ClassTooLong: SmartRefreshLayout (refresh-layout-kernel/src/main/java/com/scwang/smart/refresh/layout/SmartRefreshLayout.java)
  • Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/example/NestedScrollExampleFragmentViewPager.java)
  • Duplicated block (10 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/practice/SecondFloorPracticeFragment.java)
  • Duplicated block (10 lines × 7) (app/src/main/java/com/scwang/refresh/layout/activity/style/BezierCircleStyleActivity.java)
  • Duplicated block (10–11 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/practice/QQBrowserPracticeActivity.java)
  • Duplicated block (11 lines × 13) (app/src/main/java/com/scwang/refresh/layout/activity/style/BezierCircleStyleActivity.java)
  • Duplicated block (11 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/practice/SecondFloorPracticeFragment.java)
  • Duplicated block (11 lines × 2) (refresh-drawable-path/src/main/java/com/scwang/smart/drawable/path/PathParser.java)
  • Duplicated block (12 lines × 8) (app/src/main/java/com/scwang/refresh/layout/activity/style/BezierCircleStyleActivity.java)
  • Duplicated block (13–14 lines × 2) (refresh-drawable-path/src/main/java/com/scwang/smart/drawable/path/PathParser.java)
  • Duplicated block (13–14 lines × 4) (app/src/main/java/com/scwang/refresh/layout/activity/style/PhoenixStyleActivity.java)
  • Duplicated block (14 lines × 3) (app/src/main/java/com/scwang/refresh/layout/activity/style/BezierCircleStyleActivity.java)
  • Duplicated block (17 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/example/SnapHelperExampleActivity.java)
  • Duplicated block (17 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/PhoenixStyleActivity.java)
  • Duplicated block (18 lines × 2) (app/src/main/java/com/scwang/refresh/layout/activity/style/PhoenixStyleActivity.java)
  • Duplicated block (18 lines × 2) (app/src/main/java/com/scwang/refresh/layout/fragment/example/EmptyLayoutExampleFragment.java)
  • …and 59 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scwang90/SmartRefreshLayout was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 24 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 224db48f8af897a930b810a6b6fc55af8cef0d57 — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-ae95d6cad036.