RepoPilotOpen in app →

daimajia/AndroidImageSlider

An amazing and convenient Android image slider.

Mixed

Stale — last commit 6y ago

weakest axis
Use as dependencyMixed

last commit was 6y ago; no tests detected

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • 15 active contributors
  • MIT licensed
  • CI configured
Show all 6 evidence items →
  • Stale — last commit 6y ago
  • Concentrated ownership — top contributor handles 79% of recent commits
  • No test directory detected
What would change the summary?
  • Use as dependency MixedHealthy if: 1 commit in the last 365 days

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 "Forkable" badge

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

Variant:
RepoPilot: Forkable
[![RepoPilot: Forkable](https://repopilot.app/api/badge/daimajia/androidimageslider?axis=fork)](https://repopilot.app/r/daimajia/androidimageslider)

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/daimajia/androidimageslider on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: daimajia/AndroidImageSlider

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/daimajia/AndroidImageSlider 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

WAIT — Stale — last commit 6y ago

  • 15 active contributors
  • MIT licensed
  • CI configured
  • ⚠ Stale — last commit 6y ago
  • ⚠ Concentrated ownership — top contributor handles 79% of recent commits
  • ⚠ No test directory 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 daimajia/AndroidImageSlider repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/daimajia/AndroidImageSlider.

What it runs against: a local clone of daimajia/AndroidImageSlider — 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 daimajia/AndroidImageSlider | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 2075 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>daimajia/AndroidImageSlider</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of daimajia/AndroidImageSlider. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/daimajia/AndroidImageSlider.git
#   cd AndroidImageSlider
#
# 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 daimajia/AndroidImageSlider and re-run."
  exit 2
fi

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

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

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

# 4. Critical files exist
test -f "library/src/main/java/com/daimajia/slider/library/SliderLayout.java" \\
  && ok "library/src/main/java/com/daimajia/slider/library/SliderLayout.java" \\
  || miss "missing critical file: library/src/main/java/com/daimajia/slider/library/SliderLayout.java"
test -f "library/src/main/java/com/daimajia/slider/library/SliderAdapter.java" \\
  && ok "library/src/main/java/com/daimajia/slider/library/SliderAdapter.java" \\
  || miss "missing critical file: library/src/main/java/com/daimajia/slider/library/SliderAdapter.java"
test -f "library/src/main/java/com/daimajia/slider/library/SliderTypes/BaseSliderView.java" \\
  && ok "library/src/main/java/com/daimajia/slider/library/SliderTypes/BaseSliderView.java" \\
  || miss "missing critical file: library/src/main/java/com/daimajia/slider/library/SliderTypes/BaseSliderView.java"
test -f "library/src/main/java/com/daimajia/slider/library/Tricks/InfiniteViewPager.java" \\
  && ok "library/src/main/java/com/daimajia/slider/library/Tricks/InfiniteViewPager.java" \\
  || miss "missing critical file: library/src/main/java/com/daimajia/slider/library/Tricks/InfiniteViewPager.java"
test -f "library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java" \\
  && ok "library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java" \\
  || miss "missing critical file: library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 2075 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~2045d)"
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/daimajia/AndroidImageSlider"
  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

AndroidImageSlider is a reusable Android library that provides an attractive, touch-enabled image carousel widget with built-in support for loading images from URLs (via Picasso), drawables, and local files. It offers multiple page transition animations powered by NineOldAndroids and includes customizable indicator dots for page navigation. Standard Android library structure: library/ contains the core SliderLayout widget and Indicators (PagerIndicator, etc.); demo/ is a runnable example app showing MainActivity.java with multiple usage patterns. The library uses Gradle build system with split APK resources organized by density (drawable-hdpi, drawable-xhdpi, etc.).

👥Who it's for

Android app developers who need to display image galleries or carousels in their applications without building carousel logic from scratch. Specifically useful for content-heavy apps (news, e-commerce, media) that want polished, animated image browsing with minimal boilerplate.

🌱Maturity & risk

This is a mature, stable library (v1.1.5+ released) with clear CI setup (Travis CI configured in .travis.yml) and a published APK demo. However, it shows signs of being in maintenance mode rather than active development—dependencies like NineOldAndroids (for pre-API-11 animation support) and the older Picasso v2.3.2 suggest this was last actively maintained around 2014-2015. Production-ready for legacy/stable projects, but not actively evolving.

Moderate risk: the library depends on NineOldAndroids and Picasso v2.3.2, both now considered legacy (modern Android uses native AnimatorSet; Picasso has been superseded by Glide/Coil). No visible test suite in the file list. Single-maintainer repo (daimajia) with no recent commit data shown. If you need image caching reliability or animation on modern Android versions (API 21+), evaluate Glide-based alternatives first.

Active areas of work

No active development is visible from the file list alone. The repo appears frozen at v1.1.5+ with demo assets (nemo.jpg, toystory.jpg, etc.) and stable gradle configuration (gradle 2.2.1, Android build tools 1.1.2). No in-progress PRs or milestones are evident.

🚀Get running

Clone and build: git clone https://github.com/daimajia/AndroidImageSlider.git && cd AndroidImageSlider && ./gradlew build. Run the demo app: ./gradlew :demo:installDebug (requires Android SDK and emulator/device). The library is published to Maven Central; add compile 'com.daimajia.slider:library:1.1.5@aar' to your app's build.gradle.

Daily commands: ./gradlew :demo:installDebug && adb shell am start -n com.daimajia.slider.demo/.MainActivity (assumes emulator running). Or open in Android Studio: File → Open, select root build.gradle, sync Gradle, then Run → Run 'demo'.

🗺️Map of the codebase

  • library/src/main/java/com/daimajia/slider/library/SliderLayout.java — Core ViewPager-based slider container that orchestrates all image display, animations, and gesture handling—essential entry point for understanding the library
  • library/src/main/java/com/daimajia/slider/library/SliderAdapter.java — Adapter bridging slider views to the ViewPager—handles image loading and view recycling for infinite carousel behavior
  • library/src/main/java/com/daimajia/slider/library/SliderTypes/BaseSliderView.java — Abstract base class defining the contract for all slider view types (Default, Text)—critical for extending with custom image renderers
  • library/src/main/java/com/daimajia/slider/library/Tricks/InfiniteViewPager.java — Custom ViewPager subclass implementing infinite looping carousel via InfinitePagerAdapter—handles the wrap-around pagination logic
  • library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java — Abstract base for all page transformers that apply visual effects during swipe—foundation for all 15+ animation variants
  • library/build.gradle — Library module build configuration with Picasso image loader and NineOldAndroids animation dependencies—required for backwards compatibility
  • demo/src/main/java/com/daimajia/slider/demo/MainActivity.java — Reference implementation showing complete slider setup, image loading patterns, and transformer/indicator usage

🛠️How to make changes

Add a Custom Page Transformer (Animation Effect)

  1. Create new class extending BaseTransformer in library/src/main/java/com/daimajia/slider/library/Transformers/ (library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java)
  2. Override transformPage() method to apply matrix transformations (rotation, scale, alpha) based on position offset ([YourNewTransformer].java)
  3. In MainActivity.demo, instantiate and apply via sliderLayout.setPageTransformer(false, new YourNewTransformer()) (demo/src/main/java/com/daimajia/slider/demo/MainActivity.java)
  4. Add transformer class to TransformerAdapter list for UI selection menu (demo/src/main/java/com/daimajia/slider/demo/TransformerAdapter.java)

Add a Custom Slider View Type (New Rendering Style)

  1. Create new class extending BaseSliderView in library/src/main/java/com/daimajia/slider/library/SliderTypes/ (library/src/main/java/com/daimajia/slider/library/SliderTypes/BaseSliderView.java)
  2. Implement getView() to inflate custom layout XML and implement image loading via getImageView() callback ([YourSliderView].java)
  3. Create layout XML in library/src/main/res/layout/ (e.g., render_type_custom.xml) with custom UI elements (library/src/main/res/layout/render_type_custom.xml)
  4. In SliderAdapter.getView(), register new type in the if-chain checking instanceof, instantiate and configure it (library/src/main/java/com/daimajia/slider/library/SliderAdapter.java)
  5. In MainActivity, add slider instances via sliderLayout.addSlider(new YourSliderView(context).setImageResource(...)) (demo/src/main/java/com/daimajia/slider/demo/MainActivity.java)

Configure Auto-Play, Animation Speed, and Indicators

  1. In your Activity onCreate/onStart, obtain SliderLayout reference from findViewById or programmatically (demo/src/main/java/com/daimajia/slider/demo/MainActivity.java)
  2. Call sliderLayout.setDuration(milliseconds) to set slide transition duration; stopAutoplay()/startAutoplay() to control auto-advance (library/src/main/java/com/daimajia/slider/library/SliderLayout.java)
  3. Call sliderLayout.setIndicatorVisibility(PagerIndicator.IndicatorVisibility.Visible/Invisible) to show/hide dots (library/src/main/java/com/daimajia/slider/library/Indicators/PagerIndicator.java)
  4. Set custom transformer via sliderLayout.setPageTransformer(false, new TransformerClass) (library/src/main/java/com/daimajia/slider/library/Transformers/BaseTransformer.java)
  5. In AndroidManifest or styles.xml, modify custom attrs (android:duration, slider:auto_cycle_direction) if using XML inflation (library/src/main/res/values/attrs.xml)

Load Images from Different Sources (URL, Drawable, File)

  1. For URL/network images, use DefaultSliderView.setImageURI(uri) — Picasso handles HTTP fetching with caching (library/src/main/java/com/daimajia/slider/library/SliderTypes/DefaultSliderView.java)
  2. For drawable resources, call setImageResource(drawableId) which internally wraps as file:// URI for Picasso (library/src/main/java/com/daimajia/slider/library/SliderTypes/BaseSliderView.java)
  3. For local file paths, use setImageFile(new File(path)) or setImageURI(Uri.fromFile(file)) (demo/src/main/)

🪤Traps & gotchas

NineOldAndroids is a backport for pre-API-11 devices (now irrelevant for modern Android); check if your minSdkVersion is actually 11+ and consider removing this dependency. Picasso 2.3.2 is old; if you hit image caching issues, upgrading to Picasso 2.5.2+ or switching to Glide may help. No obvious test suite means any modifications require manual testing on devices. The README mentions needing both INTERNET and READ_EXTERNAL_STORAGE permissions even for drawable-only sliders—verify this is still true before deploying.

💡Concepts to learn

  • ViewPager & PagerAdapter — SliderLayout subclasses ViewPager to enable horizontal swiping and page-based carousel behavior; PagerAdapter defines which images to display and how to recycle views for performance
  • Page Transformers & NineOldAndroids Animators — PageTransformer applies frame-by-frame animations (zoom, fade, rotation) as pages slide; this library uses NineOldAndroids to backport Animator APIs to pre-API-11 Android
  • Scrap View Recycling — PagerAdapter recycles off-screen page Views (via destroyItem/instantiateItem) to minimize memory for large image lists; understanding this pattern is critical when customizing the adapter
  • Auto-scroll with Handler & Timer — SliderLayout implements timer-based auto-advance of carousel pages; requires careful lifecycle management (pause on activity stop, resume on start) to avoid memory leaks
  • Touch Event Interception & GestureDetector — Slider must distinguish between user swipes (manual page navigation) and auto-scroll commands; gesture detection prevents accidental double-scrolls
  • Image Loading with Picasso — SliderLayout delegates URL image loading to Picasso, which handles caching, resizing, and async loading; understanding Picasso Target callbacks is essential for debugging load failures
  • Fragment Lifecycle & View Binding — If using SliderLayout in Fragments, the auto-scroll timer must be stopped in onPause() and restarted in onResume() to avoid crashes and battery drain when fragment is backgrounded
  • denzcoskun/ImageSlideshow — Modern Kotlin-based Android image slider library with ViewPager2 and Kotlin coroutines, replacing NineOldAndroids/legacy patterns
  • smarteist/Android-Image-Slider — Contemporary fork/alternative with improved image loading, better animation support, and active maintenance
  • bumptech/glide — Industry-standard image loading library that supersedes Picasso; if updating this slider, you'd likely integrate Glide instead
  • daimajia/AndroidAnimations — Companion library by same author exposing NineOldAndroids animation APIs; used for page transition effects in this slider
  • square/picasso — Current image loading dependency; understanding Picasso request lifecycle is key to debugging image load failures in the slider

🪄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 unit tests for SliderAdapter.java and SliderLayout.java

The library lacks automated testing coverage. The core slider components (SliderAdapter.java and SliderLayout.java) handle critical functionality like image loading, pagination, and animation state management. Unit tests would catch regressions, improve code quality, and give contributors confidence when modifying core behavior. Currently, testing relies only on manual demo app verification.

  • [ ] Create library/src/test/java/com/daimajia/slider/library/ directory structure
  • [ ] Write tests for SliderAdapter lifecycle methods (onBindViewHolder, getCount, getItem)
  • [ ] Write tests for SliderLayout event listeners and state transitions
  • [ ] Add Android unit test dependencies (junit, mockito, robolectric) to library/build.gradle
  • [ ] Configure test task in library/build.gradle to run during CI

Upgrade Gradle build configuration to modern Android Gradle Plugin

The repo uses gradle:1.1.2 (from 2014) with outdated SDK manager plugin. This prevents building on modern Android toolchains, blocks Java 8+ features, and causes issues with newer Android API levels. Upgrading to Android Gradle Plugin 7.x+ would improve build speed, enable modern dependency management (BOM support), and support targetSdkVersion 33+, which is now required for Google Play.

  • [ ] Update build.gradle: change classpath 'com.android.tools.build:gradle:1.1.2' to 'com.android.tools.build:gradle:7.4.2'
  • [ ] Remove deprecated classpath 'com.jakewharton.sdkmanager:gradle-plugin' line
  • [ ] Update gradle wrapper version in build.gradle from 2.2.1 to 8.x
  • [ ] Update library/build.gradle and demo/build.gradle with modern android {} block syntax
  • [ ] Test compilation against targetSdkVersion 33+ and verify demo app runs

Add GitHub Actions CI workflow to replace Travis CI

The project uses Travis CI (referenced in README badge and .travis.yml), which has shifted to a freemium model and is no longer ideal for open source. GitHub Actions is native to the platform, free for public repos, and more maintainable. A workflow would automatically build, run tests (once added), and verify demo APK builds on every PR/push, catching integration issues early.

  • [ ] Create .github/workflows/android-build.yml workflow file
  • [ ] Configure workflow to run on push and pull_request events
  • [ ] Add build steps: checkout, setup JDK 11+, assemble library and demo APK
  • [ ] Add test step (once unit tests exist) to run ./gradlew test
  • [ ] Update README.md: replace Travis CI badge with GitHub Actions badge pointing to new workflow

🌿Good first issues

  • Add unit tests for SliderLayout.java covering ViewPager synchronization, auto-scroll start/stop, and indicator update callbacks—currently no test files visible in the repo
  • Create a modern Glide-based alternative to the Picasso integration in MainActivity.java as a code sample in the demo app, since Picasso 2.3.2 is outdated
  • Add JavaDoc comments to public methods in SliderLayout and Indicators/PagerIndicator (e.g., setSliderAdapter, startAutoScroll, setPageTransformer) to improve IDE discoverability for new users

Top contributors

Click to expand

📝Recent commits

Click to expand
  • e318cab — Merge pull request #110 from MarcRubio/Fix#70 (daimajia)
  • e39f97c — Fix bug #70. Initial delay was hardcoded to 1 second. Now uses delay which was set. (MarcRubio)
  • 8c67460 — modify jar gen function (v1.1.5) (daimajia)
  • 3c9862e — Merge pull request #107 from kojustin/master (daimajia)
  • 83fff0b — Allow specifying a Picasso instance to use (kojustin)
  • 323a43f — Merge pull request #104 from massimobio/master (daimajia)
  • 7a9cb5a — Fix demo to prevent memory leak on device orientation change (massimobio)
  • 28bf41e — Merge pull request #100 from massimobio/master (daimajia)
  • 2e890ec — Corrected method name to better follow Android convetions (massimobio)
  • 33de566 — Changed PageChangeListener to add/remove (massimobio)

🔒Security observations

This project has significant security concerns due to its age and use of heavily outdated dependencies and build tools. The Gradle toolchain (2.2.1), Android Gradle Plugin (1.1.2), and key libraries like Picasso (2.3.2) from 2014-2015 contain numerous known vulnerabilities. The project lacks modern Android security features and best practices. Immediate action is required to update all dependencies, build tools, and Android API targets to current versions. The image loading functionality should be audited for MITM vulnerability protections. This codebase should not be used in production without significant security remediation.

  • High · Outdated Gradle Build Tools — build.gradle (top-level). The project uses gradle version 2.2.1 and Android Gradle Plugin 1.1.2, which are extremely outdated (released around 2014-2015). These versions contain numerous known security vulnerabilities and lack modern security features. Fix: Update to the latest stable Gradle version (8.x) and Android Gradle Plugin (8.x). Update the wrapper task to use a current gradleVersion.
  • High · Outdated Dependencies — library/build.gradle and demo/build.gradle. Dependencies like Picasso 2.3.2 (released 2014) and com.android.support libraries are deprecated. The build.gradle uses '+' version wildcards which can introduce unexpected breaking changes or security vulnerabilities from newer versions. Fix: Replace deprecated support libraries with AndroidX equivalents. Pin all dependencies to specific versions rather than using '+' wildcards. Update Picasso to a maintained image loading library or upgrade to the latest version (2.8.1+).
  • High · ProGuard Configuration Not Hardened — demo/proguard-rules.txt and library/proguard-rules.txt. ProGuard rules files exist (proguard-rules.txt) but without visibility into their contents, and given the age of the project, they likely lack modern obfuscation and security hardening rules for production builds. Fix: Review and update ProGuard rules. Ensure proper obfuscation is applied, sensitive methods are not stripped, and reflection-based code is properly configured.
  • Medium · Potential Image Loading Vulnerabilities — library/src/main/java/com/daimajia/slider/library/SliderTypes/. The project loads images from URLs and local files through Picasso 2.3.2. This outdated version may lack protections against Man-in-the-Middle (MITM) attacks, improper SSL/TLS certificate validation, or other image processing vulnerabilities. Fix: Update Picasso to the latest version. Implement certificate pinning for HTTPS image URLs. Validate image sources and implement proper error handling for malformed images.
  • Medium · No HTTPS Enforcement — Image loading implementation across SliderTypes. The project may load images from HTTP URLs without HTTPS enforcement, making it vulnerable to MITM attacks and image manipulation. Fix: Enforce HTTPS for all remote image URLs. Implement network security configuration to prevent cleartext traffic.
  • Medium · Deprecated Android SDK Target — library/AndroidManifest.xml and build configurations. The project structure and dependency versions suggest targeting older Android API levels without modern security features (permissions model, TLS 1.2+ enforcement, etc.). Fix: Update targetSdkVersion to API 34+ (current). Update minSdkVersion to at least API 21. Review and update AndroidManifest.xml permissions.
  • Low · Missing Security Headers in Gradle Configuration — build.gradle (buildscript section). No explicit secure repository configuration or signature verification for Maven Central dependencies. Fix: Add repository verification and consider using Maven Central's secure repository URL. Enable dependency verification in gradle.properties.

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.

Mixed signals · daimajia/AndroidImageSlider — RepoPilot