Skip to content

UI Polish, Adaptive Icons, Edge-to-Edge Layout Fixes, and Carousel Simplification - #22

Merged
Dhangofa merged 9 commits into
mainfrom
dev
Aug 19, 2026
Merged

UI Polish, Adaptive Icons, Edge-to-Edge Layout Fixes, and Carousel Simplification#22
Dhangofa merged 9 commits into
mainfrom
dev

Conversation

@Dhangofa

Copy link
Copy Markdown
Owner

📝 Overview

This PR introduces a significant visual and functional polish to the application. It implements proper Android 8.0+ adaptive icons with optical depth, resolves edge-to-edge layout clipping in both portrait and landscape orientations, fixes landscape card cut-offs by implementing a responsive layout, and drastically simplifies the carousel UX by removing error-prone auto-cycling logic.

✨ Key Changes

🎨 App Icon & Branding Updates

  • Adaptive Icon Support (API 26+): Created an <adaptive-icon> configuration to resolve visual bugs on modern Pixel/AOSP ROMs where the legacy icon was forcibly shrunk inside a white circular background.
  • Premium Icon Background: Replaced the flat background with a rich linear gradient transitioning from vibrant light blue to a deep navy edge.
  • 3D Foreground Depth: Wrapped the core cell-tower vector in a scaling group (75%) for generous negative space, and applied a semi-transparent dark tint (#40001030) with an X/Y offset to create a 3D optical drop shadow.
  • **Added Depth and Gradient to the Static Icon.
  • Decoupled In-App Logo: Created an exact, unscaled duplicate of the logo (ic_logo_ui) specifically for the action bar. This decouples in-app branding from the launcher icon rules, ensuring the logo renders at full 100% scale without looking artificially small.

📱 Layout & Responsiveness Fixes

  • Edge-to-Edge Clipping Resolved: Added android:fitsSystemWindows="true" to both portrait and landscape root layouts. This correctly instructs the Window Manager to respect safe insets, preventing the top header from clipping into the status bar and the footer from hiding behind the navigation bar.
  • Responsive Landscape Cards: Fixed the bug where static guide cards were cut off on larger screens.
    • Replaced the hardcoded HorizontalScrollView with a fluid LinearLayout (match_parent).
    • Converted the 3 static cards to use dynamic weighting (android:layout_width="0dp", android:layout_weight="1"). They will now evenly distribute and stretch to perfectly fill 100% of the horizontal space regardless of the device aspect ratio.
  • Landscape Icon Proportions: Restored the landscape ImageView dimensions (39dp) to ensure branding identically matches the portrait layout.

⚙️ UX & State Logic Simplification

  • Removed Carousel Auto-Cycling: Stripped all auto-swipe timers (authorizedCarouselRunnable, carouselHandler) from the UI.
  • Static Carousel State Routing: Simplified the updateCarouselContext logic to strictly enforce state routing:
    • Unauthorized state statically snaps to Page 1.
    • Authorized state statically snaps to Page 2.
  • Cleaned Lifecycle Hooks:
    • onResume: Instantly snaps to the correct page without attaching timer runnables.
    • onPause: Completely emptied (removed all handler callbacks and preference savings).
  • Removed SharedPreferences Memory: Purged all memory saving/loading logic for the carousel to prevent state ghosting, incorrect index saving across sessions, and timer resets during manual swiping.

- Created a dedicated background layer XML for the adaptive icon implementation.
- Implemented a rich linear gradient transitioning from vibrant light blue to a deep navy edge.
- Eliminated the flat, single-color background to give the launcher icon a premium, polished aesthetic.
- Created an exact duplicate of the cell-tower vector graphic specifically for in-app layouts.
- Removed the 75% scaling group from this version so it renders at full 100% size inside the app's UI.
- Decoupled the in-app branding from the launcher icon, preventing the action bar logo from appearing artificially small.
- Wrapped the core cell-tower vector paths in a scaling group (scaleX="0.75", scaleY="0.75") to add generous padding and negative space around the edges.
- Duplicated the main vector path and applied a semi-transparent dark tint (#40001030) with an X/Y offset.
- Created a subtle optical drop shadow, giving the white icon a floating, three-dimensional depth over the background.
- Created the API 26+ <adaptive-icon> configuration file to support modern Android launcher shapes.
- Linked the newly split foreground (ic_launcher_foreground) and background (ic_launcher_background) layers.
- Resolved the visual bug on AOSP/Pixel ROMs where the legacy icon was forcibly shrunk inside a white circular background.
- Added android:fitsSystemWindows="true" to the root LinearLayout to instruct AOSP Window Managers to respect safe insets.
- Fixed the bug where the top header clipped into the status bar and the footer hid behind the 3-button navigation bar on stock Android.
- Replaced the action bar's ic_launcher_foreground reference with the new unscaled ic_logo_ui drawable.
- Applied android:fitsSystemWindows="true" to the root landscape layout to ensure safe padding across notches and navigation bars when the device is rotated.
- Swapped the action bar logo reference to use the unscaled ic_logo_ui asset.
- Restored the landscape ImageView dimensions (39dp) to ensure the branding matches the proportions of the portrait layout perfectly.
- Replaced the hardcoded HorizontalScrollView wrapper around the 3 static guide cards with a fluid LinearLayout configured as match_parent.
- Changed the static width (android:layout_width="260dp") of all three individual cards (staticCard1, staticCard2, staticCard3) to 0dp.
- Added android:layout_weight="1" to all three cards.
- This ensures that instead of cutting off or requiring side-scrolling on large screens, all three cards stretch and evenly distribute themselves to seamlessly fill 100% of the available horizontal space regardless of the device's aspect ratio.
- Stripped the authorizedCarouselRunnable entirely from the codebase, stopping the 7-second automatic swipe timer.
- Removed the carouselHandler instantiation entirely since background threads and timers are no longer needed for the UI.
- Cleaned up the updateCarouselContext method: it now statically sets currentCarouselIndex = 0 (Page 1) if unauthorized, and statically sets currentCarouselIndex = 1 (Page 2) if authorized.
- Updated the onResume lifecycle hook to instantly snap to the 2nd page if isUIAuthorized is true, without trying to attach a timer runnable.
- Cleaned up the onPause lifecycle hook to completely empty (removed all handler callbacks and preference savings).
- Removed all SharedPreferences logic related to carousel memory state to prevent ghosting or saving incorrect indices across sessions.
- Cleaned up the manual touch listener to remove any removeCallbacks or postDelayed timer resets when the user manually swipes left or right.
- Added Background Gradient
- Added Shadow Effect in main Antenna Icon
@Dhangofa
Dhangofa merged commit fe58db2 into main Aug 19, 2026
1 check passed
@Dhangofa
Dhangofa deleted the dev branch August 19, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant