ikew0ng/SwipeBackLayout
An Android library that help you to build app with swipe back gesture.
Stale — last commit 7y ago
weakest axislast commit was 7y ago; no tests detected…
no tests detected; no CI workflows detected…
Documented and popular — useful reference codebase to read through.
last commit was 7y ago; no CI workflows detected
- ✓13 active contributors
- ✓Distributed ownership (top contributor 47% of recent commits)
- ✓Apache-2.0 licensed
Show all 6 evidence items →Show less
- ⚠Stale — last commit 7y ago
- ⚠No CI workflows detected
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Mixed → Healthy if: 1 commit in the last 365 days; add a test suite
- →Fork & modify Mixed → Healthy if: add a test suite
- →Deploy as-is Mixed → Healthy if: 1 commit in the last 180 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 "Great to learn from" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/ikew0ng/swipebacklayout)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/ikew0ng/swipebacklayout on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: ikew0ng/SwipeBackLayout
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:
- 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. - 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.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/ikew0ng/SwipeBackLayout 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 7y ago
- 13 active contributors
- Distributed ownership (top contributor 47% of recent commits)
- Apache-2.0 licensed
- ⚠ Stale — last commit 7y ago
- ⚠ No CI workflows detected
- ⚠ 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 ikew0ng/SwipeBackLayout
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/ikew0ng/SwipeBackLayout.
What it runs against: a local clone of ikew0ng/SwipeBackLayout — 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 ikew0ng/SwipeBackLayout | Confirms the artifact applies here, not a fork |
| 2 | License is still Apache-2.0 | Catches relicense before you depend on it |
| 3 | Default branch master exists | Catches branch renames |
| 4 | Last commit ≤ 2454 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of ikew0ng/SwipeBackLayout. If you don't
# have one yet, run these first:
#
# git clone https://github.com/ikew0ng/SwipeBackLayout.git
# cd SwipeBackLayout
#
# 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 ikew0ng/SwipeBackLayout and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "ikew0ng/SwipeBackLayout(\\.git)?\\b" \\
&& ok "origin remote is ikew0ng/SwipeBackLayout" \\
|| miss "origin remote is not ikew0ng/SwipeBackLayout (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
&& ok "license is Apache-2.0" \\
|| miss "license drift — was Apache-2.0 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"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 2454 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~2424d)"
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/ikew0ng/SwipeBackLayout"
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).
⚡TL;DR
SwipeBackLayout is an Android library that enables swipe-to-dismiss gesture navigation (swiping from edges to go back). It wraps Activities with a draggable overlay that detects swipes from left, right, bottom, or all edges and animates the Activity exit with a parallax shadow effect, providing iOS-style back navigation for Android apps. Standard Android library monorepo: library/src/main/java/me/imid/swipebacklayout/ contains the core (SwipeBackLayout.java, ViewDragHelper.java, Utils.java), library/src/main/java/.../app/ provides Activity base classes (SwipeBackActivity, SwipeBackActivityBase, SwipeBackActivityHelper), samples/ contains a runnable demo Activity, and library/src/main/res/ holds shadow PNGs and layout templates.
👥Who it's for
Android developers building consumer-facing apps who want to implement iOS-familiar swipe-back gestures without building custom touch handling from scratch. Particularly useful for apps targeting users transitioning from iOS or aiming for a modern, gesture-driven UX.
🌱Maturity & risk
Mature but largely unmaintained: the repo shows a completed, stable library at v1.1.0 distributed via JCenter (2013-era release pattern). No visible CI/CD pipeline in the build config, no test directory structure evident, and the single-maintainer pattern suggests it's in legacy maintenance mode rather than active development.
Significant legacy risk: depends on android-support-v4.jar (pre-AndroidX), build config references Gradle 3.0.0 (from ~2017), and no evidence of updates for modern Android (API 30+, AndroidX, etc.). Single maintainer (ikew0ng) and JCenter dependency (sunset in 2021) are red flags; migration to AndroidX or replacement with modern alternatives may be required.
Active areas of work
No active development visible in the provided data. This appears to be a feature-complete, stable library in archive status. The README points to a GooglePlay demo and encourages pull requests in a develop branch, but no recent commits, open PRs, or milestones are evident from the file structure alone.
🚀Get running
Clone the repo, navigate to the root, and build the library module: git clone https://github.com/ikew0ng/SwipeBackLayout.git && cd SwipeBackLayout && ./gradlew build. To run the demo: ./gradlew :samples:installDebug (requires connected Android device or emulator).
Daily commands:
For library: ./gradlew :library:build produces the AAR. For demo app: ./gradlew :samples:assemble && ./gradlew :samples:installDebug to build and push to emulator/device, then launch me.imid.swipebacklayout.demo package.
🗺️Map of the codebase
- library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java: Core custom ViewGroup implementing drag detection, edge tracking, parallax shadow rendering, and finalize/cancel animations—the heart of the library.
- library/src/main/java/me/imid/swipebacklayout/lib/ViewDragHelper.java: Touch event router and fling detector (ported from Android support library) that drives gesture recognition and velocity calculation for smooth animations.
- library/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivity.java: Public API entry point—Activity subclass that wraps content in SwipeBackLayout and exposes getSwipeBackLayout() for configuration.
- library/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivityHelper.java: Internal orchestrator that manages lifecycle hook setup (onCreate, onPostCreate) and delegates to SwipeBackLayout for state/animation control.
- library/src/main/res/layout/swipeback_layout.xml: Template defining the composite view hierarchy (FrameLayout wrapper with shadow drawables and content placeholder) inflated by SwipeBackActivityHelper.
- samples/src/main/java/me/imid/swipebacklayout/demo/DemoActivity.java: Runnable example showing how to extend SwipeBackActivity, call getSwipeBackLayout(), and toggle edge tracking modes (EDGE_LEFT, EDGE_RIGHT, EDGE_BOTTOM, EDGE_ALL).
🛠️How to make changes
Core gesture logic: edit library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java and ViewDragHelper.java. Activity integration: modify library/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivity.java or SwipeBackActivityHelper.java. Demo: samples/src/main/java/me/imid/swipebacklayout/demo/DemoActivity.java shows usage. UI/shadows: update library/src/main/res/ and library/src/main/res/layout/swipeback_layout.xml.
🪤Traps & gotchas
Library targets old android-support-v4 (pre-AndroidX); AndroidX projects may have classpath conflicts. Window transparency must be explicitly set in theme (android:windowIsTranslucent—omitting it breaks the shadow effect). ViewDragHelper is tightly coupled to the support library version; upgrading Gradle/SDK without updating this copy can cause runtime crashes. No gradle.properties or version catalog to pin dependency versions.
💡Concepts to learn
- ViewDragHelper — This repo's core—a support library utility for tracking multi-touch events, computing velocities, and animating Views; understanding its onTouchEvent() interception and computeScroll() pattern is essential to modifying gesture behavior.
- Parallax Scrolling / Depth Perception — SwipeBackLayout renders offset shadow drawables at different rates as the user drags, creating a 3D layering effect; this is the visual signature that distinguishes the library and requires understanding View Z-ordering and drawable positioning.
- Activity Window Transparency & Z-Order — Swipe-back requires
android:windowIsTranslucentto show the previous Activity behind the dragged overlay; this repo's core gotcha and relies on Android window manager's translucency layers. - Fling & Velocity Tracking (Touch Gesture Recognition) — ViewDragHelper calculates swipe velocity from onTouchEvent() history; if velocity exceeds a threshold, the drag auto-completes to finish the Activity. Core to feeling responsive.
- Decorator Pattern (Activity Wrapping) — SwipeBackActivity and SwipeBackActivityHelper wrap user Activities without requiring multiple inheritance; understanding this composition pattern is key to extending the library for custom Activity types.
- FrameLayout Composition & Z-Ordering — SwipeBackLayout extends FrameLayout to layer content, shadow drawables, and draggable overlay; Z-order management (which child renders on top) affects touch interception and visual stacking.
- Edge-Based Touch Interception (EDGE_LEFT, EDGE_RIGHT, etc.) — The library only activates drag tracking when touch originates within a margin of screen edges; this prevents accidental triggers during normal scrolling and is configurable via setEdgeTrackingEnabled().
🔗Related repos
Baseflow/sticky-parallax-header-compose— Modern Kotlin/Compose alternative for parallax gesture UX; useful if migrating SwipeBackLayout to Jetpack Compose.r0adkll/SlideBackLayout— Similar swipe-back library with additional customization (custom animations, callback hooks); direct competitor and inspiration source.android/architecture-samples— Reference for modern Android project structure, AndroidX adoption, and testing patterns to modernize SwipeBackLayout's build/test setup.material-components/material-components-android— Canonical Material Design library for Android; SwipeBackLayout could adopt Material Motion specs for swipe animations to align with platform norms.insitro/tofino— Historical predecessor showing early Android gesture frameworks; provides context on how ViewDragHelper evolved as the standard touch routing abstraction.
🪄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.
Migrate library/libs/android-support-v4.jar to gradle dependency
The repo currently includes android-support-v4.jar as a committed binary in library/libs/ and samples/libs/. This is outdated practice - the support library has been replaced by AndroidX and gradle should manage dependencies. This prevents version updates, increases repository size, and conflicts with modern Android development practices. Migrating to gradle dependencies in build.gradle files will modernize the build system.
- [ ] Update library/build.gradle to add 'androidx.appcompat:appcompat' and 'androidx.core:core' dependencies instead of local jar
- [ ] Update samples/build.gradle with the same AndroidX dependencies
- [ ] Remove library/libs/android-support-v4.jar and samples/libs/android-support-v4.jar from version control
- [ ] Update library/src/main/AndroidManifest.xml and samples/src/main/AndroidManifest.xml if needed for AndroidX compatibility
- [ ] Test that the sample app still builds and runs correctly
Add instrumented unit tests for SwipeBackLayout gesture handling
The library has no visible test directory despite containing complex gesture handling logic in library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java and library/src/main/java/me/imid/swipebacklayout/lib/ViewDragHelper.java. These core components require testing to ensure swipe detection, edge detection, and animation behavior work correctly across different scenarios and Android versions.
- [ ] Create library/src/androidTest/java/me/imid/swipebacklayout/lib/ directory structure
- [ ] Write SwipeBackLayoutTest.java testing edge detection, swipe direction validation, and threshold calculations
- [ ] Write ViewDragHelperTest.java for touch event handling and drag state management
- [ ] Add androidx.test:runner and androidx.test.espresso:espresso-core to library/build.gradle testImplementation
- [ ] Configure build.gradle to run instrumented tests and verify all swipe gesture scenarios pass
Add documentation for SwipeBackActivityHelper and SwipeBackListenerActivityAdapter in README.md
The README only shows usage via SwipeBackActivity inheritance, but the library also provides library/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackActivityHelper.java and library/src/main/java/me/imid/swipebacklayout/lib/app/SwipeBackListenerActivityAdapter.java for more flexible integration patterns. These alternatives are undocumented, leaving developers unaware of composition-based options for projects that cannot extend SwipeBackActivity.
- [ ] Add 'Advanced Usage' section to README.md after the Simple Example
- [ ] Document SwipeBackActivityHelper usage pattern with code example for custom Activity bases
- [ ] Document SwipeBackListenerActivityAdapter pattern for Activities that already extend another base class
- [ ] Include example of how to call SwipeBackActivityHelper methods in onPostCreate() and onDestroy()
- [ ] Add note about when to use composition over inheritance and compatibility requirements
🌿Good first issues
- Migrate library from android-support-v4.jar to AndroidX (androidx.legacy:legacy-support-v4). Update build.gradle, imports in ViewDragHelper.java, and libs/ references. This unlocks modern compiler support and Play Store requirements.
- Add unit tests for SwipeBackLayout gesture edge cases (e.g., test EDGE_LEFT vs. EDGE_ALL tracking, verify shadow parallax during drag, assert Activity finish() on fling thresholds). Create library/src/test/ and wire into build.gradle.
- Document configuration gotchas in README: add a troubleshooting section covering required
android:windowIsTranslucenttheme attribute, how to set edge flags per Activity, and how to customize shadow drawables via setXxxCallback() callbacks.
⭐Top contributors
Click to expand
Top contributors
- @Issac — 39 commits
- @ikew0ng — 11 commits
- @yrom — 9 commits
- @ike — 5 commits
- @laysionqet — 5 commits
📝Recent commits
Click to expand
Recent commits
7c6b0ac— Update README.md (ikew0ng)d1ff156— Add files via upload (ikew0ng)a8053ef— Delete support.jpeg (ikew0ng)327fb3a— Update README.md (ikew0ng)acd776b— Add files via upload (ikew0ng)293cd1c— upgrade to 1.3.0 (ike)3c94397— Upgrade to 1.2.0 (ike)dcf960c— Merge pull request #158 from laysionqet/master (ikew0ng)72fe284— call onScrollStateChange when scrollPercent changed (laysionqet)706ee42— Merge pull request #157 from laysionqet/master (ikew0ng)
🔒Security observations
This Android library project has significant security concerns primarily related to outdated dependencies and build tools. The use of Gradle 3.0.0 (from 2017), deprecated Bintray plugin, outdated Android Support Library instead of AndroidX, and jcenter() repository creates a vulnerable supply chain. These issues should be addressed immediately through comprehensive dependency updates and migration to modern build systems. The codebase itself appears to be a gesture-handling library without obvious injection vulnerabilities, but build-time security is critically compromised. No hardcoded secrets were detected in the analyzed files.
- High · Outdated Gradle Plugin Version —
build.gradle. The build configuration uses Gradle plugin version 3.0.0 (classpath 'com.android.tools.build:gradle:3.0.0'), which is from 2017 and contains known security vulnerabilities. This version lacks modern security features and bug fixes. Fix: Update to the latest stable version of Android Gradle Plugin (currently 8.x or higher). Review and update all build dependencies regularly. - High · Outdated Bintray Plugin —
build.gradle. The gradle-bintray-plugin version 1.7 is outdated. Bintray has been sunset by JFrog, and this plugin is no longer maintained. Using deprecated build tools can introduce security risks and build failures. Fix: Migrate to Maven Central Repository or alternative artifact repositories. Remove the Bintray plugin and update the build distribution pipeline accordingly. - Medium · Outdated Android Support Library —
library/libs/android-support-v4.jar, samples/libs/android-support-v4.jar. The project references android-support-v4.jar directly as a JAR file in library/libs and samples/libs directories. The Android Support Library has been superseded by AndroidX, which includes critical security and stability improvements. Direct JAR dependencies bypass dependency management systems. Fix: Migrate from Support Library to AndroidX. Use gradle dependencies instead of JAR files. Add 'androidx.appcompat:appcompat:1.x.x' and other required AndroidX packages to build.gradle. - Medium · Missing Dependency Version Pinning —
build.gradle. The build.gradle file uses dynamic version resolution (jcenter() and google() repositories without explicit version constraints for transitive dependencies). This can lead to unpredictable builds with potentially vulnerable transitive dependencies. Fix: Explicitly pin all dependency versions. Remove jcenter() (deprecated) and rely only on google() and mavenCentral(). Use dependency locking or explicit version specifications. - Medium · Use of Deprecated jcenter() Repository —
build.gradle. The build configuration includes jcenter() repository which was deprecated and shut down by JFrog in 2021. This can cause build failures and security issues as dependencies cannot be reliably resolved. Fix: Remove jcenter() repository. Use google() and mavenCentral() repositories exclusively. - Low · Missing Input Validation in Gesture Handling —
library/src/main/java/me/imid/swipebacklayout/lib/ViewDragHelper.java, library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java. The SwipeBackLayout library handles touch gestures and drag operations (ViewDragHelper, SwipeBackLayout). Without examining the implementation, there's a potential risk of improper input validation leading to gesture spoofing or unintended UI behavior if edge cases aren't handled. Fix: Perform security code review of gesture handling logic. Ensure proper bounds checking, velocity validation, and edge case handling for touch events. - Low · No Security-Related Build Configuration —
library/build.gradle, samples/build.gradle. The project lacks modern Android security best practices in the build configuration such as ProGuard/R8 minification rules, tamper detection configurations, or security manifest attributes. Fix: Enable R8/ProGuard code shrinking and obfuscation. Configure appropriate buildTypes with security flags. Add security-related AndroidManifest attributes.
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.