RepoPilotOpen in app →

yarolegovich/DiscreteScrollView

A scrollable list of items that centers the current element and provides easy-to-use APIs for cool item animations.

Concerns

Stale and unlicensed — last commit 2y ago

weakest axis
Use as dependencyConcerns

no license — legally unclear; last commit was 2y ago…

Fork & modifyConcerns

no license — can't legally use code; no CI workflows detected

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isConcerns

no license — can't legally use code; last commit was 2y ago…

  • 4 active contributors
  • Tests present
  • Stale — last commit 2y ago
Show all 7 evidence items →
  • Small team — 4 contributors active in recent commits
  • Single-maintainer risk — top contributor 96% of recent commits
  • No license — legally unclear to depend on
  • No CI workflows detected
What would change the summary?
  • Use as dependency ConcernsMixed if: publish a permissive license (MIT, Apache-2.0, etc.)
  • Fork & modify ConcernsMixed if: add a LICENSE file
  • Deploy as-is ConcernsMixed if: add a LICENSE file

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Great to learn from" badge

Paste into your README — live-updates from the latest cached analysis.

RepoPilot: Great to learn from
[![RepoPilot: Great to learn from](https://repopilot.app/api/badge/yarolegovich/discretescrollview?axis=learn)](https://repopilot.app/r/yarolegovich/discretescrollview)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/yarolegovich/discretescrollview on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: yarolegovich/DiscreteScrollView

Generated by RepoPilot · 2026-05-09 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/yarolegovich/DiscreteScrollView shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

AVOID — Stale and unlicensed — last commit 2y ago

  • 4 active contributors
  • Tests present
  • ⚠ Stale — last commit 2y ago
  • ⚠ Small team — 4 contributors active in recent commits
  • ⚠ Single-maintainer risk — top contributor 96% of recent commits
  • ⚠ No license — legally unclear to depend on
  • ⚠ No CI workflows detected

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live yarolegovich/DiscreteScrollView repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/yarolegovich/DiscreteScrollView.

What it runs against: a local clone of yarolegovich/DiscreteScrollView — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in yarolegovich/DiscreteScrollView | Confirms the artifact applies here, not a fork | | 2 | Default branch master exists | Catches branch renames | | 3 | Last commit ≤ 657 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>yarolegovich/DiscreteScrollView</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of yarolegovich/DiscreteScrollView. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/yarolegovich/DiscreteScrollView.git
#   cd DiscreteScrollView
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of yarolegovich/DiscreteScrollView and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "yarolegovich/DiscreteScrollView(\\.git)?\\b" \\
  && ok "origin remote is yarolegovich/DiscreteScrollView" \\
  || miss "origin remote is not yarolegovich/DiscreteScrollView (artifact may be from a fork)"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 657 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~627d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/yarolegovich/DiscreteScrollView"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

DiscreteScrollView is an Android library that extends RecyclerView to create a centered, card-based scrolling list where the current item is always centered on screen and adjacent items are partially visible. It handles snappy item animations and scroll physics automatically, making it simple to build interfaces like product carousels, weather cards, or ViewPager-style galleries without manual layout calculations. Standard Android library structure: library/src/main/java contains the core engine (DiscreteScrollView extends RecyclerView, DiscreteScrollLayoutManager handles positioning, transform/ package holds animation logic like ScaleTransformer), while library/src/androidTest holds integration tests with a TestActivity and TestAdapter. No monorepo; single-purpose library module.

👥Who it's for

Android developers building consumer-facing UIs (shopping apps, weather apps, card-based feeds) who need a polished scrolling carousel experience with minimal boilerplate—they're replacing custom ViewPager or RecyclerView hacks with a battle-tested, centering-focused component.

🌱Maturity & risk

Moderately mature and stable: version 1.5.1 released, full test suite present (DataSetModificationTest, ScrollFunctionalityTest, DiscreteScrollViewTest in androidTest/), but last commit date is not visible in provided data—inspect git log to confirm active maintenance. The library is used in production (sample app on Google Play), indicating real-world reliability.

Low-to-moderate risk: single-maintainer (yarolegovich), minimal dependencies (just androidx.recyclerview, androidx.annotation), but no visible CI/CD pipeline (no .github/workflows or Travis config in file list). Risks increase if maintainer becomes unavailable; however, the codebase is contained (only 118KB Java) and well-tested, reducing the surface for hidden bugs.

Active areas of work

No explicit PR or milestone data in the provided file list, so check GitHub Issues and recent commits directly. The sample app (sample/src/main/java) suggests ongoing maintenance, and version pinning (gradle.properties) indicates deliberate release cycles.

🚀Get running

git clone https://github.com/yarolegovich/DiscreteScrollView.git
cd DiscreteScrollView
./gradlew build
./gradlew installDebug  # to run sample app on emulator/device

Daily commands: No traditional 'dev server'. To test locally: ./gradlew build compiles the library; ./gradlew installDebug deploys the sample app (if connected to Android emulator/device). Run instrumented tests with ./gradlew connectedAndroidTest.

🗺️Map of the codebase

🛠️How to make changes

Start in library/src/main/java/com/yarolegovich/discretescrollview/: (1) DiscreteScrollView.java for public API, (2) DiscreteScrollLayoutManager.java for scroll/positioning logic, (3) transform/ for item animations. For testing, add cases to library/src/androidTest/java/com/yarolegovich/discretescrollview/ following existing test structure (TestActivity, TestAdapter, CustomAssertions).

🪤Traps & gotchas

  1. LayoutManager override: Do NOT manually call setLayoutManager() on DiscreteScrollView; the library internally instantiates DiscreteScrollLayoutManager. 2. Orientation setup: DSVOrientation is an enum (horizontal/vertical); setting orientation via XML (app:dsv_orientation) vs. code (setOrientation) must be consistent. 3. Adapter data changes: DataSetModificationTest exists, suggesting data modifications have quirks—use notifyDataSetChanged() cautiously with centered scrolling. 4. proguard-rules.pro present—check library/proguard-rules.pro for reflection-sensitive classes if you enable ProGuard.

💡Concepts to learn

  • Custom LayoutManager — DiscreteScrollView's core mechanism relies on DiscreteScrollLayoutManager overriding onLayoutChildren() and scroll calculations; understanding LayoutManager contracts is essential to extend or debug centering behavior.
  • Snap-to-center scroll physics — The library automatically snaps the nearest item to screen center on fling/scroll end; this is a ViewPager-like UX pattern that requires custom scroll offset calculations and velocity dampening.
  • Item decoration & transformation — DiscreteScrollItemTransformer interface applies scale, rotation, or alpha changes to items based on their position relative to center; this is the mechanism for the 'cards shrink as they leave center' effect seen in gifs.
  • Pivot-based 2D transforms — Pivot.java encapsulates anchor points for scaling (e.g., scale around center vs. top-left); critical for predictable animation positioning when items shrink/expand during scroll.
  • Offscreen item buffering — setOffscreenItems() reserves layout space beyond visible bounds; this prevents layout thrashing and allows smooth pre-loading of adjacent cards (like ViewPager's offscreenPageLimit).
  • RecyclerView.OnScrollListener chaining — ScrollListenerAdapter allows clients to hook into scroll events without breaking internal centering logic; pattern avoids tight coupling between view and data layers.
  • Instrumented testing with TestActivity context — androidTest suite uses a custom TestActivity to provide a real Activity context for RecyclerView/LayoutManager testing; mimics production environment better than unit tests and catches UI thread issues.
  • android/views-widgets-samples — Official Google Android samples using RecyclerView; reference for RecyclerView patterns that DiscreteScrollView extends
  • google/flexbox-layout — Alternative Android LayoutManager-based solution for adaptive layouts; same ecosystem patterns for custom layout measurement/placement
  • nickbutcher/plaid — Real-world Android app using RecyclerView with custom scroll behaviors; demonstrates carousel/card patterns that DiscreteScrollView simplifies
  • ReactiveX/RxJava — Not a direct dependency, but sample app likely uses Rx for data binding; understanding reactive patterns helps with scroll listener chain composition
  • square/picasso — Common image-loading library for card carousels; sample app uses Glide (in dependencies), but Picasso is idiomatic alternative

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add instrumented tests for DiscreteScrollItemTransformer and Pivot classes

The transform package (DiscreteScrollItemTransformer.java, ScaleTransformer.java, Pivot.java) has no corresponding androidTest coverage. These are critical for visual transformations and animations. Adding instrumented tests would ensure transformations work correctly across different screen sizes and orientations, preventing regressions in the core animation logic.

  • [ ] Create library/src/androidTest/java/com/yarolegovich/discretescrollview/transform/ScaleTransformerTest.java with tests for scale transformation calculations
  • [ ] Create library/src/androidTest/java/com/yarolegovich/discretescrollview/transform/PivotTest.java to validate pivot point calculations
  • [ ] Add tests verifying transformations are applied correctly to items at different scroll positions
  • [ ] Test edge cases like minimum/maximum scale values and pivot boundary conditions

Add unit tests for DSVScrollConfig and DSVOrientation configuration classes

DSVScrollConfig.java and DSVOrientation.java are configuration enums/classes with no test coverage in library/src/test/. These define core behavioral parameters. Adding unit tests would validate configuration combinations, defaults, and ensure the configuration system is robust before integration testing.

  • [ ] Create library/src/test/java/com/yarolegovich/discretescrollview/DSVScrollConfigTest.java with tests for scroll configuration initialization and getters
  • [ ] Create library/src/test/java/com/yarolegovich/discretescrollview/DSVOrientationTest.java to test orientation enum values and direction mappings
  • [ ] Add tests verifying configuration builder patterns (if applicable) and invalid configuration rejection
  • [ ] Test interaction between orientation and scroll behavior configurations

Add integration test for InfiniteScrollAdapter wrapping behavior

InfiniteScrollAdapter.java enables infinite scrolling but has no dedicated test coverage. Currently only DataSetModificationTest.java exists. Adding focused tests would validate that the adapter correctly wraps items, handles edge cases like single-item datasets, and maintains proper position mapping when scrolling infinitely in both directions.

  • [ ] Create library/src/androidTest/java/com/yarolegovich/discretescrollview/InfiniteScrollAdapterTest.java
  • [ ] Add test for adapter item wrapping with various dataset sizes (1, 2, 10+ items)
  • [ ] Test position mapping correctness when scrolling past dataset boundaries
  • [ ] Verify getItemCount() returns correctly wrapped count and onBindViewHolder() maps to correct original position
  • [ ] Test edge case: single-item dataset wrapped infinitely

🌿Good first issues

  • Add ScrollListenerAdapter tests: library/src/androidTest lacks coverage for ScrollListenerAdapter.java (only main/java version exists). Write tests validating onScroll, onCurrentItemChanged, onItemIndexSelected callbacks in ScrollFunctionalityTest.java.
  • Document transform/Pivot.java API: No visible Javadoc or README section explaining Pivot centering modes. Add inline documentation + example in README showing how to use Pivot with custom ScaleTransformer implementations.
  • Add infinite scroll example: InfiniteScrollAdapter.java exists but no sample/src example demonstrates it. Create a sample Activity wrapping InfiniteScrollAdapter to show endless carousel behavior.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • a3a22d7 — Update README.md (yarolegovich)
  • 4639790 — Update README.md (yarolegovich)
  • 3c77896 — Updated README for v1.5.1 (yarolegovich)
  • a7c7372 — Fixed onItemChanged not being called after scrollToPosition re #147 (yarolegovich)
  • 9d97982 — Allow restricting scroll to one direction or disabling it re #189 (yarolegovich)
  • a1896bf — Fixed slight item transformer error caused by round off re #194 (yarolegovich)
  • 623d55b — Fixed and/or supressed new lint warnings (yarolegovich)
  • a6eb096 — Updated README with the latest version (yarolegovich)
  • 863f185 — New bintray upload setup re #134 (yarolegovich)
  • a96b065 — Migrated to androidx re #134 (yarolegovich)

🔒Security observations

The codebase shows moderate security concerns primarily centered on outdated dependencies. The most critical issue is the use of Gradle 4.0.1 and multiple AndroidX libraries from 2018-2019 that lack current security patches. The project is a UI library (DiscreteScrollView) with limited attack surface for injection vulnerabilities, but the dependency chain exposes the application to known vulnerabilities from outdated libraries. No hardcoded

  • High · Outdated Gradle Build Plugin — build.gradle (root). The project uses Gradle 4.0.1 (classpath 'com.android.tools.build:gradle:4.0.1'), which was released in 2019 and is no longer supported. This version may contain known security vulnerabilities and lacks security patches. Fix: Update to the latest stable Gradle plugin version (currently 8.x or higher). Run 'gradlew wrapper --gradle-version=<latest>' to update the wrapper.
  • High · Outdated AndroidX Dependencies — gradle.properties (dependencies section). Several AndroidX dependencies are significantly outdated: recyclerview:1.0.0 (2018), appcompat:1.1.0 (2019), annotation:1.1.0 (2019), and material:1.0.0 (2018). These versions may contain unpatched security vulnerabilities. Fix: Update to the latest stable versions: androidx.recyclerview:recyclerview:1.3.x, androidx.appcompat:appcompat:1.6.x, androidx.annotation:annotation:1.7.x, and com.google.android.material:material:1.10.x or higher.
  • High · Outdated Glide Image Loading Library — gradle.properties (Glide dependency). Glide version 4.11.0 is from 2020 and is outdated. Image loading libraries are frequent targets for security issues related to image processing vulnerabilities. Fix: Update Glide to the latest stable version (currently 4.16.x or higher) to receive security patches and bug fixes.
  • Medium · Outdated Mockito Testing Library — gradle.properties (testDeps - mockito). Mockito 2.13.0 (2017) is significantly outdated and may contain known vulnerabilities. While this is a test dependency, it runs in the build environment. Fix: Update to Mockito 4.x or 5.x (latest stable version) to ensure test environment security.
  • Medium · Outdated JUnit Testing Library — gradle.properties (testDeps - jUnit). JUnit 4.13 is outdated. Consider upgrading to JUnit 5 or the latest 4.x version for better security and feature support. Fix: Update to junit:junit:4.13.2 (latest 4.x) or migrate to junit:junit:5.x for improved security and features.
  • Medium · Outdated Robolectric Testing Library — gradle.properties (testDeps - robolectric). Robolectric 3.0 is from 2016 and is severely outdated. This may introduce vulnerabilities in the test environment. Fix: Update to Robolectric 4.x (latest stable version, currently 4.11.x or higher).
  • Low · Use of Deprecated JCenter Repository — build.gradle (buildscript and allprojects sections). The build configuration includes jcenter() repository which was shut down on May 1, 2021. While Gradle may handle this gracefully, it's a deprecated configuration. Fix: Remove jcenter() and rely on google() and mavenCentral() repositories which are actively maintained.
  • Low · Missing ProGuard Configuration Review — library/proguard-rules.pro and sample/proguard-rules.pro. While proguard-rules.pro files exist, they are not visible in the provided content. Without reviewing them, obfuscation and optimization rules cannot be validated. Fix: Review ProGuard rules to ensure proper code obfuscation and that security-sensitive code paths are appropriately protected.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Concerning signals · yarolegovich/DiscreteScrollView — RepoPilot