bingoogolapple/BGABanner-Android
引导界面滑动导航 + 大于等于1页时无限轮播 + 各种切换动画轮播效果
Stale and unlicensed — last commit 1y ago
weakest axisno license — legally unclear; last commit was 1y ago…
no license — can't legally use code; no tests detected…
Documented and popular — useful reference codebase to read through.
no license — can't legally use code; last commit was 1y ago…
- ✓2 active contributors
- ⚠Stale — last commit 1y ago
- ⚠Small team — 2 contributors active in recent commits
Show all 7 evidence items →Show less
- ⚠Single-maintainer risk — top contributor 99% of recent commits
- ⚠No license — legally unclear to depend on
- ⚠No CI workflows detected
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Concerns → Mixed if: publish a permissive license (MIT, Apache-2.0, etc.); 1 commit in the last 365 days
- →Fork & modify Concerns → Mixed if: add a LICENSE file
- →Deploy as-is Concerns → Mixed 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.
[](https://repopilot.app/r/bingoogolapple/bgabanner-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/bingoogolapple/bgabanner-android on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: bingoogolapple/BGABanner-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/bingoogolapple/BGABanner-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
AVOID — Stale and unlicensed — last commit 1y ago
- 2 active contributors
- ⚠ Stale — last commit 1y ago
- ⚠ Small team — 2 contributors active in recent commits
- ⚠ Single-maintainer risk — top contributor 99% of recent commits
- ⚠ No license — legally unclear to depend on
- ⚠ 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 bingoogolapple/BGABanner-Android
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/bingoogolapple/BGABanner-Android.
What it runs against: a local clone of bingoogolapple/BGABanner-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 bingoogolapple/BGABanner-Android | Confirms the artifact applies here, not a fork |
| 2 | Default branch master exists | Catches branch renames |
| 3 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 4 | Last commit ≤ 544 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of bingoogolapple/BGABanner-Android. If you don't
# have one yet, run these first:
#
# git clone https://github.com/bingoogolapple/BGABanner-Android.git
# cd BGABanner-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 bingoogolapple/BGABanner-Android and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "bingoogolapple/BGABanner-Android(\\.git)?\\b" \\
&& ok "origin remote is bingoogolapple/BGABanner-Android" \\
|| miss "origin remote is not bingoogolapple/BGABanner-Android (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"
# 4. Critical files exist
test -f "library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java" \\
&& ok "library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java" \\
|| miss "missing critical file: library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java"
test -f "library/src/main/java/cn/bingoogolapple/bgabanner/BGAViewPager.java" \\
&& ok "library/src/main/java/cn/bingoogolapple/bgabanner/BGAViewPager.java" \\
|| miss "missing critical file: library/src/main/java/cn/bingoogolapple/bgabanner/BGAViewPager.java"
test -f "library/src/main/java/cn/bingoogolapple/bgabanner/BGABannerScroller.java" \\
&& ok "library/src/main/java/cn/bingoogolapple/bgabanner/BGABannerScroller.java" \\
|| miss "missing critical file: library/src/main/java/cn/bingoogolapple/bgabanner/BGABannerScroller.java"
test -f "library/src/main/java/cn/bingoogolapple/bgabanner/transformer/BGAPageTransformer.java" \\
&& ok "library/src/main/java/cn/bingoogolapple/bgabanner/transformer/BGAPageTransformer.java" \\
|| miss "missing critical file: library/src/main/java/cn/bingoogolapple/bgabanner/transformer/BGAPageTransformer.java"
test -f "library/src/main/java/cn/bingoogolapple/bgabanner/BGAGuideLinkageLayout.java" \\
&& ok "library/src/main/java/cn/bingoogolapple/bgabanner/BGAGuideLinkageLayout.java" \\
|| miss "missing critical file: library/src/main/java/cn/bingoogolapple/bgabanner/BGAGuideLinkageLayout.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 544 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~514d)"
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/bingoogolapple/BGABanner-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
BGABanner-Android is a ViewPager-based banner carousel library for Android that combines guide screen navigation, infinite auto-looping for ≥1 page, and multiple transition animations (alpha, scale, rotate, etc.). It provides both image indicators (dots) and numeric indicators, supports dynamic page count from server data, and includes pause-on-touch/resume-on-release behavior. Dual-module structure: the library logic lives in the core BGABanner class (implied from imports in demo), while demo/ contains comprehensive examples across four Activity classes (GuideActivity, MainActivity, FrescoDemoActivity, ListViewDemoActivity, RecyclerViewDemoActivity) with model classes (BannerModel, RefreshModel) and an Engine for data management. Layout XML files use custom BGABanner XML attributes (banner_pageChangeDuration, banner_transitionEffect, banner_pointDrawable, etc.).
👥Who it's for
Android developers building apps that need intro/onboarding screens (GuideActivity pattern), product listing carousels with auto-rotation, or any ViewPager that requires smooth infinite looping with pause-on-interaction. Primarily Chinese developer community based on author's GitHub presence.
🌱Maturity & risk
Moderately mature: the library is stable enough for production use with comprehensive demo coverage (FrescoDemoActivity, ListViewDemoActivity, RecyclerViewDemoActivity), but the last visible commit appears dated (gradle build setup is from ~2019 era with classpath 'com.android.tools.build:gradle:3.5.4'). No evidence of recent maintenance or CI/CD pipelines. Verdict: production-stable but not actively maintained.
Low-to-moderate risk: single-author library with no visible test suite, outdated Gradle version (3.5.4 from 2019), and potential AndroidX compatibility issues (manually requires 'androidx.legacy:legacy-support-v4'). The jitpack.io distribution means no Maven Central hosting. No open issue tracker visible in file list to assess backlog.
Active areas of work
No active development is visible from the provided file structure; the repo appears to be in maintenance mode. The README documents multiple working features (infinite looping, custom indicators, transition animations, ListViewPager/RecyclerViewPager support), suggesting the feature set is complete but no new work is being tracked.
🚀Get running
git clone https://github.com/bingoogolapple/BGABanner-Android.git && cd BGABanner-Android && ./gradlew assembleDebug (or import into Android Studio and run demo module). The gradle wrapper should handle dependency fetching from the configured jitpack.io repository.
Daily commands:
In Android Studio: select 'demo' module, click 'Run app' (or adb install demo/build/outputs/apk/debug/demo-debug.apk). Activities auto-launch from MainActivity; navigate to GuideActivity, FrescoDemoActivity, ListViewDemoActivity, or RecyclerViewDemoActivity to test different use cases.
🗺️Map of the codebase
library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java— Core banner widget class that orchestrates all banner functionality including infinite scrolling, animations, and gesture handlinglibrary/src/main/java/cn/bingoogolapple/bgabanner/BGAViewPager.java— Custom ViewPager subclass that enables infinite looping by wrapping adapter data and handling page index calculationslibrary/src/main/java/cn/bingoogolapple/bgabanner/BGABannerScroller.java— Scroller implementation that controls animation timing and smoothness during banner transitions and auto-scrolllibrary/src/main/java/cn/bingoogolapple/bgabanner/transformer/BGAPageTransformer.java— Base interface and contract for all page transition animations that define how pages transform during ViewPager scrollinglibrary/src/main/java/cn/bingoogolapple/bgabanner/BGAGuideLinkageLayout.java— Layout container for guide view transitions that synchronizes multiple indicators with page swipes in guide flowslibrary/src/main/res/layout/bga_banner_item_image.xml— Default layout template for banner items containing ImageView that can be overridden for custom item layoutslibrary/src/main/res/values/attrs.xml— XML attribute definitions that expose customizable banner properties like indicator position, animation type, and timing
🛠️How to make changes
Add a new Page Transition Animation
- Create new transformer class extending BGAPageTransformer in transformer package (
library/src/main/java/cn/bingoogolapple/bgabanner/transformer/YourCustomPageTransformer.java) - Implement transformPage() method with your animation logic (scale, rotation, alpha, etc.) (
library/src/main/java/cn/bingoogolapple/bgabanner/transformer/YourCustomPageTransformer.java) - Add new enum value to TransitionEffect enum list (
library/src/main/java/cn/bingoogolapple/bgabanner/transformer/TransitionEffect.java) - Update BGABanner.setTransitionEffect() to instantiate your transformer class for the new effect (
library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java)
Integrate Banner with Custom Image Loading Library
- Create custom adapter extending from your data model (see FrescoDemoActivity pattern) (
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/FrescoDemoActivity.java) - Override getView() in adapter to bind images using your library (Fresco, Glide, Picasso) (
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/FrescoDemoActivity.java) - Set placeholder drawable via BGABanner.setPlaceHolder() for loading state (
library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java) - Pass adapter to banner via mBanner.setAdapter(yourAdapter) (
library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java)
Create Custom Item Layout for Banner
- Define custom XML layout file with your view structure instead of default ImageView (
demo/src/main/res/layout/item_custom.xml) - Create ViewHolder class to cache view references from custom layout (
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/CustomDemoActivity.java) - Extend BGABanner adapter and override getView() to inflate custom layout and bind data (
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/CustomDemoActivity.java) - Pass custom adapter to mBanner.setAdapter() and configure auto-scroll/animation options (
library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java)
Set Up Guide Page Navigation with Synchronized Indicators
- Use BGAGuideLinkageLayout as container in activity layout for guide pages (
demo/src/main/res/layout/activity_guide.xml) - Configure guide layout attributes for indicator position and animation timing (
library/src/main/res/values/attrs.xml) - In activity, set up adapter with guide page data and set page change listeners (
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/GuideActivity.java) - Call mGuideLayout.setCurrentItem() to update page and indicators synchronously (
library/src/main/java/cn/bingoogolapple/bgabanner/BGAGuideLinkageLayout.java)
🔧Why these technologies
- ViewPager (AndroidX deprecated, using legacy android.support.v4) — Standard Android widget for horizontal
🪤Traps & gotchas
The library uses jitpack.io (not Maven Central) for distribution, requiring explicit maven { url 'https://jitpack.io' } in repositories. The AndroidX legacy support library (androidx.legacy:legacy-support-v4) may conflict with newer AndroidX configurations. Demo activities hardcode placeholder images (R.drawable.holder) and expect network connectivity for Glide. The pause-on-touch feature relies on ViewPager touch event interception; custom touch handling in child views may break auto-pause. No documented minimum Android API level is provided; ViewPager implies API 11+.
🏗️Architecture
💡Concepts to learn
- ViewPager infinite looping (modulo arithmetic) — The core mechanism enabling seamless wrap-around: actual page count is multiplied and modulo is used to map user swipes to logical positions, creating illusion of infinite scroll
- Page transition animations (animation framework) — BGABanner supports multiple effects (alpha, scale, rotate, depth) via PageTransformer callbacks; understanding how to compose these transforms is key to customizing carousel appearance
- Touch event interception and pause-on-interact — The library intercepts MotionEvent to pause auto-rotation when user touches the banner, requiring careful event bubbling to avoid breaking child click handlers
- Generic Adapter pattern (Java generics) — BGABanner.Adapter<V, T> uses bounded type parameters to work with any View type and any data model, reducing boilerplate across different carousel content types
- Placeholder/holder pattern for image loading — Using R.drawable.holder prevents blank whitespace while network images load; critical UX detail implemented consistently across FrescoDemoActivity and MainActivity
- Custom XML attributes (AttributeSet parsing) — BGABanner exposes banner_pageChangeDuration, banner_transitionEffect, banner_pointDrawable as custom attrs; developers must parse these in the View constructor using TypedArray
- Handler-based auto-rotation scheduling — The library likely uses Handler.postDelayed() to trigger periodic page changes; understanding thread safety and lifecycle cleanup (cancel in onDestroy) prevents memory leaks and animation glitches
🔗Related repos
youth5201314/banner— Another Android banner carousel library with similar infinite-loop and gesture-pause features, major alternative in Chinese dev ecosystemalibaba/UltraViewPager— Alibaba's advanced ViewPager wrapper supporting multiple transform animations and complex carousel scenariospaolorotolo/AppIntro— Dedicated intro/onboarding library using ViewPager, directly competes for GuideActivity use casesbingoogolapple/BGARefreshLayout-Android— Companion library by same author (bingoogolapple) for pull-to-refresh; users may integrate both in ListViewPager scenariosfacebook/fresco— Image loading library explicitly supported in FrescoDemoActivity; ecosystem companion for advanced image caching in carousels
🪄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 banner lifecycle and automatic scroll behavior
The library has critical features like infinite auto-scrolling when >= 1 page, pause-on-touch, and resume-on-release that lack test coverage. Currently no test files exist in library/src. Adding instrumented tests would catch regressions in these core behaviors and help new contributors understand the API.
- [ ] Create library/src/androidTest/java/cn/bingoogolapple/bgabanner/test/ directory structure
- [ ] Add BGABannerAutoScrollTest.java to test auto-scroll start/stop, pause on touch, resume on release
- [ ] Add BGABannerIndicatorTest.java to test indicator position switching and image vs number indicators
- [ ] Add BGABannerPageChangeTest.java to test setCurrentItem(), listener callbacks, and page change animations
- [ ] Reference demo activities (GuideActivity.java, FrescoDemoActivity.java) as setup patterns
Add GitHub Actions CI workflow for automated APK builds and lint checks
The repo uses Gradle 3.5.4 with AGP and a multi-module structure (library + demo) but has no CI pipeline. New contributors can't validate builds before PR submission. A CI workflow would catch build failures, lint issues, and ensure demo APK builds successfully.
- [ ] Create .github/workflows/build.yml with Android Gradle build job
- [ ] Add steps to run ./gradlew lintDebug for demo and library modules
- [ ] Add step to build demo APK with ./gradlew assembleDebug
- [ ] Include Android SDK setup action (e.g., android-setup-action or ndk-build setup)
- [ ] Make workflow trigger on PRs and commits to master branch
Document AndroidX migration requirements and create migration guide
The build.gradle uses old jcenter() repository and Gradle 3.5.4 (from 2019). The README has no section on AndroidX support or minimum API level. New contributors need to know current compatibility. A migration guide would clarify this and reduce support issues.
- [ ] Add 'AndroidX Support & Compatibility' section to README.md after 'Usage' section
- [ ] Document minimum targetSdkVersion and compileSdkVersion requirements
- [ ] Create MIGRATION.md with step-by-step AndroidX migration instructions for users upgrading to future versions
- [ ] Reference demo/build.gradle and library/build.gradle current configurations
- [ ] Include troubleshooting section for common migration issues (ViewPager vs ViewPager2, etc)
🌿Good first issues
- Add unit tests for BannerModel.java and RefreshModel.java data transformation logic; currently no test/ directory exists, making it easy to introduce regression bugs when modifying data binding.: small
- Upgrade AGP from 3.5.4 to latest (8.0+) and ensure AndroidX Lifecycle/ViewModel patterns are compatible; update proguard-rules.pro to reflect modern obfuscation needs.: medium
- Create Javadoc comments for the main BGABanner class and Adapter interface (inferred but not visible in file list); document custom XML attributes (banner_transitionEffect, banner_pageChangeDuration) in a dedicated CUSTOMIZATION.md file.: small
⭐Top contributors
Click to expand
Top contributors
- @bingoogolapple — 99 commits
- @wanghao76 — 1 commits
📝Recent commits
Click to expand
Recent commits
a328a9e— Update README.md (bingoogolapple)ba0a57e— Merge pull request #251 from bingoogolapple/develop (bingoogolapple)8a56da2— 3.0.1:从 JCenter 迁移到 JitPack (bingoogolapple)76541b1— Update README.md (bingoogolapple)64118c0— Merge pull request #241 from bingoogolapple/develop (bingoogolapple)18c1c20— 3.0.0 支持 androidx (bingoogolapple)f7c61f0— Merge pull request #240 from bingoogolapple/develop (bingoogolapple)15fc3dd— fix #201 (bingoogolapple)d4d16a2— fix #169 fix #170 (bingoogolapple)fa54fbd— fix #164 (bingoogolapple)
🔒Security observations
- High · Outdated Gradle Build Tools —
build.gradle (classpath 'com.android.tools.build:gradle:3.5.4'). The project uses Gradle 3.5.4 (released in 2019) which contains multiple known security vulnerabilities. This version lacks critical security patches and bug fixes for dependency resolution and build system vulnerabilities. Fix: Update to the latest stable Gradle version (currently 8.x). Minimum recommended is 7.x for Android projects. Run 'gradle wrapper --gradle-version 8.x' and update build.gradle accordingly. - High · Use of JCenter Repository (Deprecated) —
build.gradle (buildscript and allprojects repositories sections). The project uses jcenter() repository which was deprecated by JFrog in 2021 and shut down in 2022. This can cause build failures and may allow serving compromised dependencies if the domain is repurposed. Fix: Replace jcenter() with mavenCentral(). Update both buildscript and allprojects repository declarations to use mavenCentral() exclusively. - Medium · Missing Network Security Configuration Validation —
demo/src/main/res/xml/network_security_config.xml. The project includes network_security_config.xml but without visibility of its contents, certificate pinning and cleartext traffic restrictions cannot be verified. Android apps should enforce HTTPS and certificate pinning for network communications. Fix: Review network_security_config.xml to ensure: 1) Cleartext traffic is disabled (cleartextTrafficPermitted=false), 2) Certificate pinning is configured for known domains, 3) Only trusted CAs are in the domain config. - Medium · Potential Intent-based Injection Risk —
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/. Multiple Activity files (MainActivity, GuideActivity, etc.) are present without visible intent validation. Android apps should validate all intent extras and data URIs to prevent injection attacks. Fix: Implement intent validation: 1) Validate all intent extras with explicit type checking, 2) Sanitize URI data before use, 3) Use explicit intents instead of implicit when possible, 4) Validate bundle contents. - Medium · Missing ProGuard Configuration Review —
demo/proguard-rules.pro, library/consumer-proguard-rules.pro. ProGuard rules files exist but their contents are not visible. Incomplete obfuscation can expose sensitive logic, while overly aggressive rules can break security-critical code. Fix: Ensure ProGuard/R8 rules: 1) Keep security-critical classes (crypto, authentication), 2) Enable code obfuscation, 3) Enable resource shrinking, 4) Test thoroughly after applying rules. - Low · No Visible API Security Implementation —
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/engine/Engine.java, demo/src/main/java/cn/bingoogolapple/bgabanner/demo/model/RefreshModel.java. The Engine.java and RefreshModel.java files suggest network operations, but without visibility into their implementation, API security measures cannot be verified (e.g., API key handling, request signing). Fix: Review implementation and ensure: 1) API keys are not hardcoded, 2) Use BuildConfig fields for sensitive configuration, 3) Implement request signing/HMAC, 4) Never log sensitive data, 5) Use HTTPS for all API calls. - Low · Potential Unvalidated Image Loading —
demo/src/main/java/cn/bingoogolapple/bgabanner/demo/ui/activity/FrescoDemoActivity.java, library/src/main/java/cn/bingoogolapple/bgabanner/BGABanner.java. The banner library loads images from network sources (indicated by Fresco integration and network usage). Unvalidated image sources could lead to local file access or other attacks. Fix: Validate image sources: 1) Whitelist allowed image domains, 2) Validate image URLs before loading, 3) Use HTTPS for image URLs, 4) Consider implementing image validation (size, format), 5) Set appropriate timeouts.
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.