Skip to content

Refresh visual theme foundation#606

Open
gioalex07 wants to merge 5 commits intoVREMSoftwareDevelopment:mainfrom
gioalex07:main
Open

Refresh visual theme foundation#606
gioalex07 wants to merge 5 commits intoVREMSoftwareDevelopment:mainfrom
gioalex07:main

Conversation

@gioalex07
Copy link
Copy Markdown

Summary

  • Refresh the app visual foundation with a more modern Material 3 styled XML theme.
  • Improve overall readability, contrast, and surface consistency without changing app behavior.

What does this implement/fix?

  • Updates the base app theme and styling in app/src/main/res/values/styles.xml.
  • Introduces a semantic day/night color palette in app/src/main/res/values/colors.xml and app/src/main/res/values- night/colors.xml.
  • Refreshes the main visual shell in:
    • app/src/main/res/layout/main_activity.xml
    • app/src/main/res/layout/main_content.xml
    • app/src/main/res/layout/main_toolbar.xml
    • app/src/main/res/layout/main_navigation.xml
    • app/src/main/res/layout/main_connection.xml
  • Updates navigation selection visuals in:
    • app/src/main/res/drawable/menu_selector.xml
    • app/src/main/res/drawable/navigation_drawer_item_background.xml

This is a small and focused UI foundation change. It does not intentionally modify app logic, navigation behavior, or
Wi-Fi analysis functionality.

Does this close any issues?

  • Related to improving the visual design and usability of the app.

How was this tested?

  • Devices / OS:
    • Pixel 6 emulator
  • Platform / Build variant:
    • Debug
  • Toolchain / Gradle / SDK version(s):
    • JDK 21
    • Gradle 9.3.1
    • Android Gradle Plugin 9.0.0
    • compileSdk 36
    • buildTools```md

Summary

  • Refresh the app's visual theme foundation with a more modern Material 3 styled XML setup.
  • Improve overall visual consistency, contrast, and spacing without changing app behavior.

What does this implement/fix?

  • Updates the base theme in app/src/main/res/values/styles.xml to use a Material 3 DayNight foundation while
    preserving the current XML/View-based architecture.
  • Introduces a semantic light/dark color palette in app/src/main/res/values/colors.xml and app/src/main/res/values- night/colors.xml.
  • Refreshes core chrome and containers:
    • app/src/main/res/layout/main_activity.xml
    • app/src/main/res/layout/main_content.xml
    • app/src/main/res/layout/main_toolbar.xml
    • app/src/main/res/layout/main_navigation.xml
    • app/src/main/res/layout/main_connection.xml
  • Updates navigation selection styling in app/src/main/res/drawable/menu_selector.xml.
  • Adds a new drawer item background resource in app/src/main/res/drawable/navigation_drawer_item_background.xml.

This is a small and focused visual foundation change. It does not modify app logic, navigation flow, or public APIs.

Does this close any issues?

  • Related to improving the app visual design and reducing legacy UI feel.

How was this tested?

  • Devices / OS: Pixel 6 emulator, Android emulator environment
  • Platform / Build variant: debug
  • Toolchain / Gradle / SDK version(s):
    • JDK 21
    • Gradle 9.3.1
    • compileSdk 36
    • buildTools 36.1.0
  • Steps to reproduce / test:
    1. Open the project in Android Studio.
    2. Sync Gradle files.
    3. Run the app on a Pixel 6 emulator.
    4. Verify the updated toolbar, drawer, bottom navigation, and main surfaces in the app.
    5. Switch between available themes and confirm visual consistency.

Example test commands:

./gradlew assembleDebug
./gradlew ktlintCheck
./gradlew testDebugUnitTest

## Checklist (required before marking ready)

- [ ] I added or updated unit tests (see app/src/test/)
- [x] I followed the project's coding style (ktlint) and formatting
- [ ] I ran lint and addressed or documented any warnings
- [x] CI checks pass (unit tests, coverage, lint)
- [x] No sensitive data, keys, or secrets are included

## Additional context

- This PR is intentionally limited to visual foundation work so it can be reviewed independently before making deeper
  UI updates.
- Manual visual verification was performed in the emulator and the updated foundation loaded correctly.

## Reviewer notes

- Please focus review on theme/resource compatibility and visual consistency across light/dark/black modes.
- No functional behavior changes are intended in this PR.
- Suggested reviewers or teams (optional): @maintainers

@VREMSoftwareDevelopment
Copy link
Copy Markdown
Owner

Thanks for the contribution.

  1. AI Usage Disclosure
    Disclose any AI tool involvement and use the “AI assistance used” label.

  2. Testing Requirements
    Changes must be tested on a real Android device.
    Emulator‑only testing or running build tasks (e.g., ktlintCheck, unit tests, successful Gradle build) is not sufficient.
    UI/UX behavior, layouts, gestures, and rendering often differ between emulators and actual devices.

Please update the PR with real‑device testing details so review can continue.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.83%. Comparing base (e3b385e) to head (dbf3680).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #606   +/-   ##
=========================================
  Coverage     97.83%   97.83%           
  Complexity      975      975           
=========================================
  Files           121      121           
  Lines          2581     2581           
  Branches        211      211           
=========================================
  Hits           2525     2525           
  Misses           19       19           
  Partials         37       37           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gioalex07
Copy link
Copy Markdown
Author

AI Usage Disclosure

  • AI assistance was used to help inspect the existing theme/layout structure and draft part of the resource updates.
  • All changes were manually reviewed, adjusted, built, and tested before submission.

How was this tested?

  • Devices / OS:
    • Samsung Galaxy A30, Android 11
    • Pixel 6 emulator
  • Platform / Build variant: debug
  • Toolchain / Gradle / SDK version(s):
    • JDK 21
    • Gradle 9.3.1
    • compileSdk 36
    • buildTools 36.1.0
  • Steps to reproduce / test:
    1. Open the project in Android Studio.
    2. Run the app on a Samsung Galaxy A30 physical device.
    3. Open the main screens: Access Points, Channel Rating, Channel Graph, and Time Graph.
    4. Open the navigation drawer and verify the selected state styling.
    5. Verify toolbar, bottom navigation, and connection panel rendering.
    6. Switch themes and confirm visual consistency and readability.

@VREMSoftwareDevelopment VREMSoftwareDevelopment added the AI assistance used Indicates that an AI assistant was used to generate this PR label Apr 4, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refreshes the app’s UI foundation by moving to a Material 3 DayNight-based theme, introducing a semantic light/dark color palette, and updating core container/navigation layouts to improve surface consistency and selection styling.

Changes:

  • Updated base themes and added Material-styled widget overrides (toolbar, bottom nav, navigation view).
  • Introduced a semantic color system with new light + night palettes.
  • Refreshed main shell layouts and navigation selection drawables for updated surfaces/selection states.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
app/src/main/res/values/styles.xml Moves to Material3 DayNight theme foundation and defines app widget styles.
app/src/main/res/values/colors.xml Replaces legacy colors with a semantic palette for light mode.
app/src/main/res/values-night/colors.xml Adds semantic palette overrides for night mode.
app/src/main/res/layout/main_toolbar.xml Updates toolbar container surfaces/padding and app bar styling.
app/src/main/res/layout/main_navigation.xml Updates drawer header background/padding and header text color.
app/src/main/res/layout/main_content.xml Adjusts main layout sizing and backgrounds; updates bottom nav background usage.
app/src/main/res/layout/main_connection.xml Updates connection panel surface and spacing/divider styling.
app/src/main/res/layout/main_activity.xml Sets activity root/drawer backgrounds for new surface palette.
app/src/main/res/drawable/navigation_drawer_item_background.xml Adds new checked-item background with inset + rounded container.
app/src/main/res/drawable/menu_selector.xml Updates nav icon/text tint selector to use theme attributes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 22 to 25
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_height="match_parent"
android:background="@color/background"
android:orientation="vertical">
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The layout background is hardcoded to @color/background. This will override the theme’s android:windowBackground and can prevent ThemeBlack from rendering true black surfaces (since @color/background resolves to the day/night surface). Prefer using a theme attribute (?attr/colorSurface/?android:attr/colorBackground) so theme overrides control the actual background.

Copilot uses AI. Check for mistakes.
Comment on lines 33 to 36
android:layout_height="0dp"
android:layout_weight="1"
android:background="@color/background"
android:orientation="vertical"
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This container also hardcodes @color/background, which can fight the theme’s surface colors (notably the black theme) and makes future theme tweaks harder. Prefer a theme attribute background so ThemeBase/ThemeBlack can control the surface consistently.

Copilot uses AI. Check for mistakes.

<style name="ThemeSystemNoActionBar" parent="ThemeSystem" />

<style name="ThemeOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ThemeOverlay is based on ThemeOverlay.AppCompat.Dark.ActionBar, but the app theme is now Theme.Material3.*. This overlay can override text/icon colors in the toolbar subtree and lead to incorrect contrast (e.g., dark overlay colors on a light surface). Consider switching this overlay to an equivalent Material3 overlay (or removing it and letting toolbarStyle control colors) to keep theming consistent.

Suggested change
<style name="ThemeOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="ThemeOverlay" parent="ThemeOverlay.Material3.ActionBar" />

Copilot uses AI. Check for mistakes.
<item name="android:background">@color/surface_container</item>
<item name="titleTextColor">@color/on_surface</item>
<item name="subtitleTextColor">@color/on_surface_variant</item>
<item name="navigationIconTint">@color/on_surface</item>
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Widget.WiFiAnalyzer.Toolbar sets navigationIconTint, but the layout uses androidx.appcompat.widget.Toolbar (not MaterialToolbar), so this tint attribute will be ignored and nav/overflow icons may end up with the wrong color under the new light surfaces. Consider switching the view to com.google.android.material.appbar.MaterialToolbar (or remove/replace the tint approach) so the icon tinting and Material3 theming work as intended.

Suggested change
<item name="navigationIconTint">@color/on_surface</item>

Copilot uses AI. Check for mistakes.
Comment on lines 26 to +38
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:elevation="0dp"
android:theme="@style/ThemeOverlay">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize" />
android:layout_height="?attr/actionBarSize"
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingEnd="@dimen/activity_horizontal_margin" />
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

android:theme is set to @style/ThemeOverlay (an AppCompat dark action bar overlay) while the toolbar/AppBar now uses a light colorSurface background. This combination can force light/white toolbar icons and menu text on a light surface. Consider using a Material3 toolbar overlay (or removing the overlay) and/or switching to MaterialToolbar so icon/text colors are derived from colorOnSurface.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +24
android:insetLeft="12dp"
android:insetTop="4dp"
android:insetRight="12dp"
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This drawable uses insetLeft/insetRight, which won’t mirror in RTL layouts even though the app enables RTL (supportsRtl=true). Use insetStart/insetEnd so selection insets are correct for RTL users.

Suggested change
android:insetLeft="12dp"
android:insetTop="4dp"
android:insetRight="12dp"
android:insetStart="12dp"
android:insetTop="4dp"
android:insetEnd="12dp"

Copilot uses AI. Check for mistakes.
android:paddingStart="@dimen/activity_horizontal_margin"
android:paddingEnd="@dimen/activity_horizontal_margin"
android:text="@string/app_full_name"
android:textColor="@color/on_surface"
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header title hardcodes @color/on_surface. Since ThemeBlack overrides the theme’s colorOnSurface, using a fixed resource here can make the black theme inconsistent. Prefer android:textColor="?attr/colorOnSurface" (or a theme attribute) so the text adapts to the active theme overrides.

Suggested change
android:textColor="@color/on_surface"
android:textColor="?attr/colorOnSurface"

Copilot uses AI. Check for mistakes.
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/background"
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting the root background to @color/background makes the activity surface use the day/night palette even when ThemeBlack is selected. Since ThemeBlack overrides colorSurface/windowBackground to true black, consider using a theme attribute here (e.g. ?attr/colorSurface / ?android:attr/colorBackground) instead of a fixed @color/* resource so the black theme remains actually black.

Suggested change
android:background="@color/background"
android:background="?attr/colorSurface"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI assistance used Indicates that an AI assistant was used to generate this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants