Ramotion/folding-cell-android
:octocat: π FoldingCell is a material design expanding content cell inspired by folding paper material made by @Ramotion
Healthy across all four use cases
weakest axisPermissive license, no critical CVEs, actively maintained β safe to depend on.
Has a license, tests, and CI β clean foundation to fork and modify.
Documented and popular β useful reference codebase to read through.
No critical CVEs, sane security posture β runnable as-is.
- β13 active contributors
- βDistributed ownership (top contributor 32% of recent commits)
- βMIT licensed
Show all 6 evidence items βShow less
- βCI configured
- βTests present
- β Stale β last commit 4y ago
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 "Healthy" badge
Paste into your README β live-updates from the latest cached analysis.
[](https://repopilot.app/r/ramotion/folding-cell-android)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/ramotion/folding-cell-android on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: Ramotion/folding-cell-android
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/Ramotion/folding-cell-android 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
GO β Healthy across all four use cases
- 13 active contributors
- Distributed ownership (top contributor 32% of recent commits)
- MIT licensed
- CI configured
- Tests present
- β Stale β last commit 4y ago
<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 Ramotion/folding-cell-android
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale β regenerate it at
repopilot.app/r/Ramotion/folding-cell-android.
What it runs against: a local clone of Ramotion/folding-cell-android β 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 Ramotion/folding-cell-android | 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 β€ 1355 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of Ramotion/folding-cell-android. If you don't
# have one yet, run these first:
#
# git clone https://github.com/Ramotion/folding-cell-android.git
# cd folding-cell-android
#
# 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 Ramotion/folding-cell-android and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "Ramotion/folding-cell-android(\\.git)?\\b" \\
&& ok "origin remote is Ramotion/folding-cell-android" \\
|| miss "origin remote is not Ramotion/folding-cell-android (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 "folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/MainActivity.java" \\
&& ok "folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/MainActivity.java" \\
|| miss "missing critical file: folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/MainActivity.java"
test -f "folding-cell-simple-example/src/main/java/com/ramotion/foldingcell/examples/simple/MainActivity.java" \\
&& ok "folding-cell-simple-example/src/main/java/com/ramotion/foldingcell/examples/simple/MainActivity.java" \\
|| miss "missing critical file: folding-cell-simple-example/src/main/java/com/ramotion/foldingcell/examples/simple/MainActivity.java"
test -f "folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/FoldingCellListAdapter.java" \\
&& ok "folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/FoldingCellListAdapter.java" \\
|| miss "missing critical file: folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/FoldingCellListAdapter.java"
test -f "folding-cell-listview-example/src/main/res/layout/cell.xml" \\
&& ok "folding-cell-listview-example/src/main/res/layout/cell.xml" \\
|| miss "missing critical file: folding-cell-listview-example/src/main/res/layout/cell.xml"
test -f "build.gradle" \\
&& ok "build.gradle" \\
|| miss "missing critical file: build.gradle"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 1355 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~1325d)"
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/Ramotion/folding-cell-android"
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
FoldingCell is an Android library that implements an expanding content cell with a paper-folding animation inspired by material design. It provides a reusable FoldingCell widget that collapses to a compact title view and expands to reveal a full content view with a smooth folding transition, used primarily in ListViews to create rich, animated list item interactions. Simple library-with-examples structure: folding-cell-listview-example/ is a runnable demo app using the core FoldingCell widget; core widget code lives in a separate module (likely folding-cell/ not shown in top 60 files due to size). The example demonstrates integration via FoldingCellListAdapter.java and Item.java model classes.
π₯Who it's for
Android developers building material design apps who need animated, space-efficient list items that expand/collapse with a paper-folding effectβparticularly useful for product cards, contact cards, or any list item requiring progressive disclosure of details.
π±Maturity & risk
Moderately mature but aging: v1.2.3 is published to Maven Central, Circle CI is configured for continuous builds, Codacy quality checks are in place, but the repo shows minimal recent activity (no commit dates visible in file list). The example app structure suggests solid production usage, but lack of visible recent commits suggests maintenance mode rather than active development.
Low-to-moderate risk: single language (Java, no Kotlin migration visible), depends on Android framework only (minimal external dependencies implied by 48KB Java), but age suggests API compatibility testing against modern Android versions (API 30+) may be stale. No test directory visible in file list, indicating sparse unit test coverage.
Active areas of work
No active development visible in provided data. The repo appears in maintenance modeβv1.2.3 on Maven Central is the latest published version, CI is configured but no recent build data shown, and file structure shows only example code and resources without visible active feature branches.
πGet running
Clone the repo, build with Gradle 3.6.2+:
git clone https://github.com/Ramotion/folding-cell-android.git
cd folding-cell-android
./gradlew build
./gradlew folding-cell-listview-example:installDebug
Daily commands: Build and deploy the example app:
./gradlew folding-cell-listview-example:assembleDebug
./gradlew folding-cell-listview-example:installDebug
Then run on emulator or device; no server or build step required.
πΊοΈMap of the codebase
folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/MainActivity.javaβ Entry point for the ListView example demonstrating how to integrate FoldingCell in a real ListView adapter patternfolding-cell-simple-example/src/main/java/com/ramotion/foldingcell/examples/simple/MainActivity.javaβ Entry point for the minimal example showing basic FoldingCell setup and animation usagefolding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/FoldingCellListAdapter.javaβ Core adapter implementation that shows how to manage FoldingCell state within ListView item renderingfolding-cell-listview-example/src/main/res/layout/cell.xmlβ FoldingCell layout structure defining the title and content view hierarchy that enables the folding animationbuild.gradleβ Root Gradle configuration defining build tools, Android SDK versions, and nexus plugin for library publishingcircle.ymlβ CI/CD pipeline configuration that validates builds and automated testing on every commit
π§©Components & responsibilities
- FoldingCell (Custom View) (Android View, ValueAnimator, Layout inflation) β Core component encapsulating the fold/unfold animation logic, managing title and content view layout, and responding to user taps
- Failure mode: Animation stutter if layout hierarchy is too deep; memory leaks if animation listeners not cleared
- FoldingCellListAdapter (BaseAdapter, ViewHolder pattern) β Manages view inflation, data binding, and lifecycle for FoldingCell instances within a ListView; preserves fold state during scrolling
- Failure mode: State loss during rapid scrolling if fold state not persisted in data model; adapter position mismatch
- MainActivity (Examples) (Activity lifecycle, ListView/ArrayAdapter) β Entry point for demonstrating FoldingCell API usage; sets up ListView or standalone cell, registers click handlers
- Failure mode: NPE if layout inflation fails; click events lost if listener not properly attached
- Layout XML Files (Android Layout XML, ViewGroup hierarchy) β Define visual hierarchy of title section (visible when collapsed) and content section (revealed when unfolded)
- Failure mode: Animation clipping if view dimensions not properly constrained; measure() errors if nested layouts conflict
πData flow
User interaction (tap on cell)βFoldingCell.toggle() methodβ Click listener captures user
π οΈHow to make changes
Add a new FoldingCell to a ListView
- Create a new layout file at folding-cell-listview-example/src/main/res/layout/cell_custom.xml with your title and content views (
folding-cell-listview-example/src/main/res/layout/cell_custom.xml) - Add a new item class extending from Item model in folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/ (
folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/Item.java) - Update FoldingCellListAdapter.getView() to inflate your new layout and bind data to title/content sections (
folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/FoldingCellListAdapter.java) - Register click listener on the cell in getView() to call toggle() for fold/unfold animation (
folding-cell-listview-example/src/main/java/com/ramotion/foldingcell/examples/listview/FoldingCellListAdapter.java)
Create a standalone FoldingCell (non-ListView)
- Define cell layout in folding-cell-simple-example/src/main/res/layout/activity_main.xml with FoldingCell element (
folding-cell-simple-example/src/main/res/layout/activity_main.xml) - In MainActivity, obtain FoldingCell reference and call toggle() on click events (
folding-cell-simple-example/src/main/java/com/ramotion/foldingcell/examples/simple/MainActivity.java)
Customize cell appearance and animation
- Modify layout structure in cell.xml to adjust hierarchy, padding, and view composition (
folding-cell-listview-example/src/main/res/layout/cell.xml) - Update cell_title_layout.xml and cell_content_layout.xml with custom views, colors, and dimensions (
folding-cell-listview-example/src/main/res/layout/cell_title_layout.xml) - Add drawable resources (images, backgrounds) to folding-cell-listview-example/src/main/res/drawable-*/ folders (
folding-cell-listview-example/src/main/res/drawable-hdpi/)
π§Why these technologies
- Android View Framework β FoldingCell is built as a custom View subclass leveraging native Android animation APIs for smooth material-design folding transitions
- ListView β Used as the primary container for demonstrating multiple FoldingCell instances with efficient view recycling in the listview example
- Gradle Build System β Enables modular example apps (simple and listview) and facilitates library publishing via gradle-nexus-plugin
- CircleCI β Provides automated build validation and continuous integration pipeline for quality assurance on commits
βοΈTrade-offs already made
-
Separate simple and listview examples
- Why: Allows developers to learn FoldingCell usage incrementally (basic usage first, then ListView integration)
- Consequence: Code duplication across example modules; changes to core logic must be replicated
-
Custom View implementation vs. composable animation library
- Why: Provides a self-contained, easy-to-integrate component with built-in folding animation behavior
- Consequence: Less flexible for non-standard folding patterns; animation timing is hardcoded into the View
-
ListView-based demos instead of RecyclerView
- Why: Matches the library's original design intent (material design for older Android APIs)
- Consequence: RecyclerView-based example would be more modern; ListView is less performant on large datasets
π«Non-goals (don't propose these)
- Support for RecyclerView out-of-the-box (only ListView examples provided)
- Standalone library artifact with Gradle central repository publishing
- Real-time data synchronization or backend integration
- Accessibility (a11y) enhancements for screen readers
- Animation timing customization through public APIs
πͺ€Traps & gotchas
No Gradle wrapper checked in (reliant on local ./gradlew command or system gradle). API level 14 (Android 4.0) minimum is very oldβbehavior on modern Android (API 30+) with scoped storage, view system changes untested. Example app uses deprecated ListView instead of RecyclerView, so integration pattern may differ for modern apps. No ProGuard obfuscation rules for production builds visible (proguard-rules.pro exists but contents unknown). Animation frame rate and folding math logic not exposed in file listβlikely black-box in compiled library.
ποΈArchitecture
π‘Concepts to learn
- ViewGroup Layout Transforms & Canvas Drawing β The paper-folding effect requires custom measurement, layout, and drawing logic in a ViewGroup subclass; understanding Android's layout pass and Canvas transforms is essential to modifying animation behavior
- Interpolator-based Animation Timing β Android animations use interpolators (linear, ease-in-out, etc.) to drive smooth motion; FoldingCell likely uses custom interpolators to match the folding paper physics
- ListView Adapter & ViewHolder Reuse β The example uses deprecated ListView pattern with FoldingCellListAdapter; understanding adapter view recycling and state management is critical to avoid memory leaks and animation artifacts
- Material Design Expanding Surface Pattern β FoldingCell implements Google's material design expandable card pattern; knowing the spec ensures consistent UX and helps rationalize animation timing and layout constraints
- Drawable Resource Density & DPI Scaling β The repo contains drawable assets in hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi folders; Android automatically selects the right densityβcritical for sharp animations across device sizes
πRelated repos
Ramotion/expanding-collection-androidβ Sister Ramotion library for Android providing similar animated cell expansion UI patterns, allows comparison of different folding/expanding approachesandroid-open-source-project/frameworks_baseβ Android framework source; necessary reference for understanding View lifecycle, layout, and animation framework underpinning FoldingCellsquare/picassoβ Common companion library for image loading in list adapters like the one shown in FoldingCellListAdapter.javaairbnb/lottie-androidβ Modern alternative for complex animations; FoldingCell uses lower-level drawing/transforms, but Lottie could simplify future animation enhancements
πͺ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 RecyclerView adapter implementation and example module
The repo currently only has a ListView example (folding-cell-listview-example). RecyclerView is the modern Android standard and many developers need this pattern. Adding a dedicated folding-cell-recyclerview-example module would significantly increase the library's utility and reduce integration friction for new contributors.
- [ ] Create new module: folding-cell-recyclerview-example/ with build.gradle mirroring folding-cell-listview-example/
- [ ] Implement FoldingCellRecyclerAdapter.java in folding-cell-recyclerview-example/src/main/java/com/ramotion/foldingcell/examples/recyclerview/
- [ ] Create layout files: activity_main.xml, cell.xml, cell_content_layout.xml, cell_title_layout.xml in folding-cell-recyclerview-example/src/main/res/layout/
- [ ] Implement MainActivity.java demonstrating RecyclerView with FoldingCell integration
- [ ] Add proguard-rules.pro for the new example module
- [ ] Update root build.gradle to include the new module
Add GitHub Actions CI workflow for automated builds and testing
The repo uses circle.yml (legacy CircleCI config) but lacks GitHub Actions integration. Modern GitHub repos benefit from native Actions for: building APKs, running lint checks, ensuring example modules compile, and validating gradle builds on PR submissions. This catches regressions early.
- [ ] Create .github/workflows/android-build.yml with steps to: checkout code, setup Java/Android SDK, run ./gradlew build on all modules
- [ ] Add lint step: ./gradlew lint to catch code quality issues
- [ ] Add example compilation verification: ./gradlew :folding-cell-listview-example:assemble
- [ ] Configure workflow to trigger on pull_request and push to main branches
- [ ] Add status badge to README.md showing workflow status
Add comprehensive Javadoc comments to FoldingCell core classes
The core FoldingCell library code (referenced by examples but not visible in provided file listing) likely lacks adequate Javadoc. This blocks auto-generated API documentation and makes contribution harder. Adding class/method-level Javadoc with @param/@return annotations for the main animation and view classes would enable generated docs and improve IDE integration.
- [ ] Locate core FoldingCell.java and supporting animation classes in the main library source
- [ ] Add class-level Javadoc explaining the expanding/folding behavior and usage pattern
- [ ] Add @param, @return, and @throws Javadoc to all public methods
- [ ] Add @deprecated tags with migration paths if any legacy APIs exist
- [ ] Run ./gradlew javadoc to generate documentation and verify no warnings
- [ ] Optionally add gradle task to generate and host docs (update README with link)
πΏGood first issues
- Add RecyclerView example: The repo only shows ListView integration in folding-cell-listview-example/. Create a parallel folding-cell-recyclerview-example/ demonstrating FoldingCell in a modern RecyclerView.Adapter with ViewHolder pattern.
- Add unit tests for animation states: No test/ directory visible. Create Android tests in folding-cell-listview-example/src/test/ and folding-cell-listview-example/src/androidTest/ covering fold/unfold lifecycle, rapid clicks, and orientation changes.
- Add Kotlin conversion of example adapter: Rewrite FoldingCellListAdapter.java as FoldingCellListAdapter.kt with idiomatic Kotlin (sealed classes for item types, coroutines for timing) to modernize the codebase for current Android developers.
βTop contributors
Click to expand
Top contributors
- @oleg-vasiliev β 32 commits
- @golovin47 β 19 commits
- @Juriv β 18 commits
- @RamotionDev β 12 commits
- @aleksei1000000 β 6 commits
πRecent commits
Click to expand
Recent commits
d8736d1β Updated *.aar link to maven central (olegv-ramotion)0d6b3b8β Merge remote-tracking branch 'origin/master' (golovin47)678a653β - Updated gradle. (golovin47)c08591dβ Update README.md (RamotionDev)b9ea471β - Updated gradle. (golovin47)33607aaβ - Refactored settings.gradle. (golovin47)02c5b3eβ - Updated gradle. (golovin47)f085380β - Removed excess code. (golovin47)6812f80β Merge remote-tracking branch 'origin/master' (golovin47)b728f2aβ - Updated gradle. (golovin47)
πSecurity observations
This Android project has significant security concerns primarily related to outdated build tools and deprecated repositories. The Gradle plugin (3.6.2) and Nexus plugin (2.3.1) are years behind current versions, and reliance on the sunset JCenter repository poses supply chain risks. The codebase itself appears to be a UI library without complex security-critical functionality, reducing certain risks. However, the build infrastructure requires immediate modernization
- High Β· Outdated Gradle Build Plugin β
build.gradle - com.android.tools.build:gradle:3.6.2. The project uses Gradle 3.6.2 (released in 2019) which is significantly outdated. This version contains known security vulnerabilities and lacks modern security features like improved dependency verification and build caching security improvements. Fix: Update to the latest stable Gradle plugin version (currently 8.x or higher). Run 'gradle wrapper --gradle-version=latest' and update build.gradle dependencies accordingly. - High Β· Deprecated JCenter Repository β
build.gradle - jcenter() in repositories. The project uses 'jcenter()' repository which was sunset by Bintray in May 2021. Dependencies from this repository may no longer be available or could be served from untrusted mirrors, increasing supply chain attack risk. Fix: Remove jcenter() from all repository declarations. Migrate to 'mavenCentral()' or 'google()' repositories which are actively maintained and have better security practices. - Medium Β· Outdated Gradle Nexus Plugin β
build.gradle - com.bmuschko:gradle-nexus-plugin:2.3.1. The gradle-nexus-plugin version 2.3.1 is outdated and may contain security vulnerabilities. This plugin handles publishing to Maven repositories and should be kept current. Fix: Update to the latest version of gradle-nexus-plugin (2.3.1 is from 2016). Consider using the official 'maven-publish' plugin instead, which is included in Gradle. - Medium Β· Missing ProGuard Configuration Review β
folding-cell-listview-example/proguard-rules.pro and folding-cell-simple-example/proguard-rules.pro. ProGuard rules files exist (proguard-rules.pro) but their content is not visible in the analysis. ProGuard misconfigurations can expose sensitive code or leave debugging information in production builds. Fix: Review ProGuard rules to ensure: 1) Sensitive classes are properly obfuscated, 2) Keep rules don't expose internal APIs, 3) Line number mapping files are protected, 4) Use -dontobfuscate sparingly. - Medium Β· No Visible Security Dependencies β
build.gradle - dependencies section. The build.gradle file shows only build system dependencies but lacks explicit security-focused dependencies like OWASP DependencyCheck or security scanning plugins that should be part of Android development best practices. Fix: Add security scanning to the build pipeline: Use 'gradle dependencyCheck' plugin to scan for known vulnerabilities, implement dependency lock files, and enable Gradle's built-in vulnerability scanning. - Low Β· Missing AndroidManifest Security Attributes β
folding-cell-listview-example/src/main/AndroidManifest.xml and folding-cell-simple-example/src/main/AndroidManifest.xml. While the AndroidManifest.xml files exist, common security attributes like 'android:usesCleartextTraffic' configuration is not visible. This could allow unencrypted network traffic. Fix: Review AndroidManifest.xml and ensure: 1) Set android:usesCleartextTraffic='false' for API 28+, 2) Implement network security configuration file (network_security_config.xml), 3) Use only HTTPS for all network communications. - Low Β· No Dependency Version Pinning β
build.gradle - allprojects repositories. The gradle configuration uses dynamic repositories (google(), jcenter()) without explicit version pinning for transitive dependencies, which could introduce unexpected updates with vulnerabilities. Fix: Implement dependency lock files using 'gradle dependencies --write-locks' or use a dependency management tool like Gradle's dependency locking feature to ensure reproducible builds.
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.