Skip to content

About

A lightweight Android overlay app that displays a semi-transparent reference image on top of other apps. Perfect for drawing, tracing, comparing images, or any task requiring a visual reference overlay.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Floating Ghost Image

A lightweight Android overlay app that displays a semi-transparent reference image on top of other apps. Perfect for drawing, tracing, comparing images, or any task requiring a visual reference overlay.

Features

  • Floating Overlay: Display any image as a semi-transparent overlay on top of other apps
  • Adjustable Opacity: Control transparency from 0% to 100% (capped at the 80% system limit for touch passthrough)
  • Lock Mode: Enable passthrough to interact with apps below the overlay
  • Edit Mode: Drag, zoom, rotate, and position the image
  • Image History: Recently used images are listed for quick re-opening
  • Share Integration: Start overlay directly from any app's share menu
  • Minimal Size: Optimized APK under 2MB
  • Clean UI: Only used XML/Kotlin

Requirements

  • Android 8.0 (API 26) or higher
  • Overlay permission (requested on first use)

Installation

playstore(2)

Usage

Starting the Overlay

  1. Open Floating Ghost Image
  2. Tap the + button to select an image (or pick one from your recent history below)
  3. Grant overlay permission if prompted
  4. The overlay starts automatically, showing both a small floating icon and your image
  5. Tap the icon to show/hide the image

Editing the Overlay

  1. Long press the floating icon to open controls
  2. Drag the icon to reposition it
  3. Use the opacity slider to adjust transparency
  4. Toggle the lock switch:
    • ON (locked): Image is passthrough - touches go through to apps below
    • OFF (unlocked): You can drag, zoom, and rotate the image
  5. Tap the back button to return to icon-only mode
  6. Tap the close button to stop the overlay

Using with Image Sharing

  1. Open any app with an image (Gallery, Browser, etc.)
  2. Tap the Share button
  3. Select Floating Ghost Image from the share menu
  4. The overlay starts automatically with your image

Controls

  • Floating Icon: Tap to show/hide image, long press to edit, drag to move
  • + Button: Select an image from your device
  • Image History: Tap a recent image to start the overlay with it
  • Opacity Slider: Adjust image transparency (0-100%, capped at the 80% system passthrough limit)
  • Lock Switch: Enable/disable passthrough mode
  • Back Button: Return to icon-only mode
  • Close Button: Stop the overlay completely

Optimization Features

This app has been heavily optimized for minimal APK size:

  • ProGuard/R8 code shrinking and obfuscation
  • Resource shrinking (removes unused resources)
  • Removed xxxhdpi and xxhdpi icon densities
  • Vector drawables only (no PNG assets)
  • Minimal dependencies (only essential AndroidX libraries)
  • Aggressive ProGuard rules (removes debug logging)
  • Native library compression disabled (extractNativeLibs=false)
  • Build features optimization (disabled unused features)

Technical Details

  • Minimum SDK: 26 (Android 8.0)
  • Target SDK: 36 (Android 16)
  • Language: Kotlin
  • Architecture: Single activity + overlay service
  • Permissions: SYSTEM_ALERT_WINDOW (overlay permission)

Project Structure

app/
├── src/main/
│   ├── java/com/rvoidex7/floatingghostimage/
│   │   ├── MainActivity.kt          # Main UI screen
│   │   ├── FloatingImageService.kt  # Overlay service
│   │   ├── ImageHistoryAdapter.kt   # History list adapter
│   │   ├── FloatingServiceState.kt  # Overlay running-state persistence
│   │   └── InverseRoundedDrawable.kt # Panel corner-radius drawable
│   ├── res/
│   │   ├── drawable/                # Vector drawables
│   │   ├── layout/                  # XML layouts (3 files)
│   │   ├── mipmap-*/                # App icons (adaptive: XML + webp fill)
│   │   ├── values/                  # Colors, strings, themes
│   │   └── xml/                     # Backup rules
│   └── AndroidManifest.xml
├── build.gradle.kts                 # App-level build config
└── proguard-rules.pro               # ProGuard optimization rules

Building from Source

Prerequisites

  • Android Studio Arctic Fox or newer
  • JDK 11 or higher
  • Android SDK with API 36

Setup

  1. Clone the repository:
git clone https://github.com/rvoidex7/floating-ghost-image.git
cd floating-ghost-image
  1. Create gradle.properties file:
# Copy the example file
cp gradle.properties.example gradle.properties

The example file contains all necessary Gradle settings. Release signing configuration is only needed by the maintainer - contributors can skip those lines and use debug builds.

Build Steps

# Build debug APK
./gradlew assembleDebug

# Install to connected device
./gradlew installDebug

# Run on connected device
./gradlew installDebug
adb shell am start -n com.rvoidex7.floatingghostimage/.MainActivity

The debug APK will be located at app/build/outputs/apk/debug/app-debug.apk

Note: Release builds are signed by the maintainer. Contributors should use debug builds for development and testing.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is open source and available under the MIT License.

Changelog

Version 1.2 (Current)

  • Min SDK raised to 26 (Android 8.0); removed pre-26 compatibility code and legacy assets
  • Opacity fixed: single-source alpha via window, capped at the 80% system passthrough limit (no visual jump on lock/unlock)
  • Faster, lag-free opacity slider (per-frame coalesced updates)

Version 1.1

  • Home panel redesign with device corner radius
  • Image history list with persistence
  • Preview and overlay bitmaps decoded off the main thread (crash/ANR fixes)
  • Overlay running state persistence and opacity slider throttling

Version 1.0

  • Initial release
  • Basic overlay functionality
  • Lock/Edit mode toggle
  • Image sharing support
  • Size optimizations (APK under 2MB)

Support

Credits

Developed by @rvoidex7

Buy Me A Coffee

Privacy

This app:

  • Does NOT collect any user data
  • Does NOT require internet permission
  • Does NOT use analytics or tracking
  • Only accesses images you explicitly select
  • Stores no data outside of temporary image URIs

All processing happens locally on your device.

About

A lightweight Android overlay app that displays a semi-transparent reference image on top of other apps. Perfect for drawing, tracing, comparing images, or any task requiring a visual reference overlay.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages