# yhaolpz/floatwindow

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/yhaolpz-floatwindow).**

4,192 stars · 652 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/yhaolpz/FloatWindow
- Homepage: https://www.jianshu.com/p/18cbc862ba7b
- awesome-repositories: https://awesome-repositories.com/repository/yhaolpz-floatwindow.md

## Description

FloatWindow is an Android library for creating draggable overlay views that persist across different applications and activities. It provides specialized components for implementing floating windows, managing system-level overlay permissions, and calculating screen coordinates.

The project features a window animation framework that enables snap-to-edge behaviors and custom movement animations. It includes an overlay permission manager to request and monitor the system permissions required to draw interfaces over other applications.

The toolkit covers UI positioning using absolute pixels or relative screen percentages to maintain consistency across device resolutions. It also provides visibility control mechanisms to filter overlays based on specific activities or background state changes, along with state monitoring for real-time position and visibility updates.

## Tags

### Mobile Development

- [Android Floating Window Implementations](https://awesome-repositories.com/f/mobile-development/android-floating-window-implementations.md) — Provides a complete framework for creating draggable floating windows that persist across Android applications.
- [Persistent Floating Overlays](https://awesome-repositories.com/f/mobile-development/persistent-floating-overlays.md) — Implements draggable overlay views that persist across different applications and activities on Android devices. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/gradlew.bat))
- [Android Libraries](https://awesome-repositories.com/f/mobile-development/android-ecosystem/android-libraries.md) — Acts as a specialized Android library for extending app functionality with persistent floating overlays.
- [System Overlay Permissions](https://awesome-repositories.com/f/mobile-development/system-overlay-permissions.md) — Manages the system-level permissions required to render floating windows over other Android applications.
- [Resolution-Independent Layouts](https://awesome-repositories.com/f/mobile-development/android-layout-components/resolution-independent-layouts.md) — Positions UI elements using screen percentages to ensure a consistent look across various device resolutions.

### Part of an Awesome List

- [Draggable Overlay Windows](https://awesome-repositories.com/f/awesome-lists/devtools/floating-windows/draggable-overlay-windows.md) — Enables the creation of floating views that can be dragged across the screen with edge-snapping support. ([source](https://github.com/yhaolpz/FloatWindow))
- [Dragging Behavior Configurations](https://awesome-repositories.com/f/awesome-lists/devtools/floating-windows/dragging-behavior-configurations.md) — Provides customizable rules for movement and snap-to-edge logic upon releasing a floating window. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/README.md))
- [Floating Window Rendering Logic](https://awesome-repositories.com/f/awesome-lists/devtools/floating-windows/floating-window-rendering-logic.md) — Supports rendering floating views using either absolute pixel dimensions or relative screen percentages. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/README.md))
- [Overlay Visibility Filters](https://awesome-repositories.com/f/awesome-lists/devtools/floating-windows/overlay-visibility-filters.md) — Includes a filtering mechanism to restrict floating windows to specific activities or hide them from certain screens. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/sample/src/main/java/com/example/yhao/floatwindow/BaseApplication.java))

### User Interface & Experience

- [Window Visibility Controllers](https://awesome-repositories.com/f/user-interface-experience/application-state-managers/window-visibility-controllers.md) — Provides utilities for toggling the visibility of floating windows based on activity triggers or background state changes. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/README.md))
- [Window-Based Overlay Rendering](https://awesome-repositories.com/f/user-interface-experience/window-based-overlay-rendering.md) — Uses the Android system window manager to render persistent overlays on top of other applications.
- [Floating Window Animation Toolkits](https://awesome-repositories.com/f/user-interface-experience/animation-and-motion-systems/configuration-utility-helpers/animation-properties/android-property-animators/floating-window-animation-toolkits.md) — Implements snap-to-edge behaviors and custom movement animations for floating user interfaces.
- [Screen Percentage Layouts](https://awesome-repositories.com/f/user-interface-experience/grid-layouts/windowed-grids/fluid-percentage-grids/screen-percentage-layouts.md) — Defines view dimensions and positions as screen percentages for consistent layouts across various resolutions.
- [Screen Coordinate Toolkits](https://awesome-repositories.com/f/user-interface-experience/grid-layouts/windowed-grids/fluid-percentage-grids/screen-percentage-layouts/screen-coordinate-toolkits.md) — Offers a toolkit for defining window sizes and coordinates using absolute pixels or relative percentages.
- [Overlay Visibility Controls](https://awesome-repositories.com/f/user-interface-experience/preview-controls/preview-visibility-controllers/overlay-visibility-controls.md) — Provides programmatic controls to show or hide the floating window based on the active screen.
- [Activity-Based Visibility Controllers](https://awesome-repositories.com/f/user-interface-experience/preview-controls/preview-visibility-controllers/overlay-visibility-controls/activity-based-visibility-controllers.md) — Manages floating window visibility based on specific Android activity triggers or background state changes.
- [Edge Snapping Animations](https://awesome-repositories.com/f/user-interface-experience/snap-points/gesture-driven-snap-animations/edge-snapping-animations.md) — Implements interpolated animations that automatically snap floating windows to the screen edges.
- [Window State Observers](https://awesome-repositories.com/f/user-interface-experience/window-state-observers.md) — Ships a system for tracking real-time floating window events, including position updates and visibility changes. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/sample/src/main/java/com/example/yhao/floatwindow/BaseApplication.java))

### Development Tools & Productivity

- [UI State Monitors](https://awesome-repositories.com/f/development-tools-productivity/workflow-automation-triggers/event-driven-triggers/ui-state-monitors.md) — Uses observers to track real-time changes in window position and visibility to trigger UI updates.

### Security & Cryptography

- [Android System Permissions](https://awesome-repositories.com/f/security-cryptography/permission-based-access-control/media-access-permissions/android-system-permissions.md) — Tracks the success or failure of Android system permission requests via listeners. ([source](https://github.com/yhaolpz/FloatWindow/blob/master/README.md))
