From bff29ada2e32b602bbdab809832937ceb9e0c0b5 Mon Sep 17 00:00:00 2001 From: Quildra Date: Fri, 1 Aug 2025 12:47:07 +0100 Subject: [PATCH] feat: implement WindowManager-based floating FAB with edge docking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace broken FloatingComposeOverlay with EnhancedFloatingFAB - True floating behavior using WindowManager overlay system - Edge docking: automatic snap to screen edges within 50dp threshold - Touch-through support: only FAB intercepts touches, rest passes to underlying apps - Expandable menu with 5 detection options (DETECT, SHINY, POKEBALL, ALL, DEBUG) - Material Design styling with circular backgrounds and proper elevation - Haptic feedback with permission checking and graceful fallbacks - Auto-hide menu after 3 seconds of inactivity - Smooth animations: 300ms edge snapping, staggered menu expansion - Added VIBRATE permission to AndroidManifest.xml - Added Material Design Components dependency Technical implementation: - WindowManager overlay with WRAP_CONTENT sizing for precise touch handling - ImageButton with custom GradientDrawable backgrounds for Material styling - ValueAnimator for smooth edge snapping with AccelerateDecelerateInterpolator - ObjectAnimator for menu item animations with staggered delays - Safe vibration with runtime permission checks and exception handling Addresses critical requirements from UI_MODERNIZATION_TASKS.md: ✅ Truly floating like CalcIV - not activity-based ✅ Edge docking with smooth animation ✅ Touch-through for underlying Pokemon GO interaction ✅ Professional Material 3 design ✅ No system UI interference 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .gitignore | 1 + .idea/deploymentTargetSelector.xml | 2 +- app/build.gradle | 3 + app/src/main/AndroidManifest.xml | 1 + .../pokegoalshelper/ScreenCaptureService.kt | 14 +- .../pokegoalshelper/ui/EnhancedFloatingFAB.kt | 515 ++++++++++++++++++ 6 files changed, 528 insertions(+), 8 deletions(-) create mode 100644 app/src/main/java/com/quillstudios/pokegoalshelper/ui/EnhancedFloatingFAB.kt diff --git a/.gitignore b/.gitignore index 38d60c0..f280071 100644 --- a/.gitignore +++ b/.gitignore @@ -114,6 +114,7 @@ fastlane/readme.md *.hprof model_export_env/ +venv*/ # Debug tools and temporary files tools/debug_scripts/debug_env/ diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index ac3a004..465d02b 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,7 +4,7 @@