Skip to content

Improve UI/UX across all Android versions (8.0 → 15) - #9

Merged
PhenixStar merged 6 commits into
mainfrom
PhenixStar/improve-UI-UX-against-all-android-versions
Jul 15, 2026
Merged

Improve UI/UX across all Android versions (8.0 → 15)#9
PhenixStar merged 6 commits into
mainfrom
PhenixStar/improve-UI-UX-against-all-android-versions

Conversation

@PhenixStar

Copy link
Copy Markdown
Owner

Summary

  • Fix broken Android 12+ theming: the values-v31 theme hardcoded system_neutral1_900 (near-black) into a DayNight theme, rendering dark backgrounds in light mode on Android 12+. Removed.
  • Make accent colors real: selecting an accent previously saved a pref and recreated the activity with zero visual effect. Each accent now applies a Material 3 tonal overlay (light + dark palettes), plus a new Dynamic (Material You) option on Android 12+.
  • Proper edge-to-edge: explicit window-inset listeners (app bar top, fragment scroll bottoms) replace fitsSystemWindows, surviving Android 15's enforced edge-to-edge; content no longer hides under the gesture bar. API 26 gets a nav-bar scrim (no dark-icon support there).
  • Adaptive launcher icon with monochrome layer for Android 13+ themed icons; predictive back opt-in.
  • targetSdk/compileSdk 34 → 35 with behavior review; fixed SDK 35 Bitmap.getConfig() nullability in QR logo rendering.

Testing

  • assembleDebug, testDebugUnitTest (all pass, incl. updated AccentColorTest), lintDebug (no errors, no new warnings)
  • Merged latest main (v1.3.0 release); kept versionCode 6 / 1.3.0 with targetSdk 35

Accent selection previously saved a preference and recreated the activity
without ever changing the theme. Each accent now applies a Material 3 tonal
overlay (night-qualified palettes cover light and dark). Adds a Dynamic
(Material You) accent on Android 12+ and removes the values-v31 theme that
hardcoded system_neutral1_900 into a DayNight theme, which rendered a
near-black background in light mode on Android 12+.

Orange uses a dark on-primary color: white on #F57C00 fails WCAG contrast.
…sions

The app disabled decor inset fitting and made system bars transparent but
never consumed insets, relying on fitsSystemWindows - which Android 15's
enforced edge-to-edge ignores. The app bar now pads by the status bar and
cutout insets, and each fragment's scroll root pads by the navigation bar
inset (clipToPadding=false), so content no longer rests behind the gesture
bar. Insets are returned unconsumed so every ViewPager2 page receives them.

Also wires ThemeManager.applyAccent into MainActivity and adds a translucent
nav-bar scrim on API 26, where dark nav icons are unsupported and a
transparent bar would leave white buttons invisible on light content.
Replaces the legacy vector icon (letterboxed by launcher masks since API 26)
with an adaptive icon: white ADB glyph foreground over the brand purple
background, plus a monochrome layer for Android 13+ themed icons. Opts into
the predictive back gesture; no code overrides back handling.
Enforced edge-to-edge is covered by the explicit inset listeners, the
foreground service already declares its specialUse subtype, and the
connectivity receiver is an exempt system broadcast. Bitmap.getConfig()
is nullable in SDK 35 (hardware bitmaps); QR logo rendering falls back
to ARGB_8888.
…-UX-against-all-android-versions

# Conflicts:
#	app/build.gradle.kts
@PhenixStar
PhenixStar merged commit 8b68cf1 into main Jul 15, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57b4037de6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

val initialRight = paddingRight
val initialBottom = paddingBottom

ViewCompat.setOnApplyWindowInsetsListener(this) { view, windowInsets ->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Request insets after installing the listener

For fragments that ViewPager2 creates after the initial window-insets dispatch, this only registers a listener and never asks the view hierarchy to re-dispatch the current insets. In that scenario (e.g. opening the Statistics or Help tab later), the bottom-padding code may never run until an inset change occurs, leaving content under the gesture/navigation bar despite the new edge-to-edge handling. Call ViewCompat.requestApplyInsets when attached after setting the listener.

Useful? React with 👍 / 👎.

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