Skip to content

fix: prevent Expanded Dark Theme inversion on scanner activity#56

Open
OS-pedrogustavobilro wants to merge 4 commits into
mainfrom
fix/RMET-5280/expanded-dark-theme
Open

fix: prevent Expanded Dark Theme inversion on scanner activity#56
OS-pedrogustavobilro wants to merge 4 commits into
mainfrom
fix/RMET-5280/expanded-dark-theme

Conversation

@OS-pedrogustavobilro

@OS-pedrogustavobilro OS-pedrogustavobilro commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds an AppCompat DayNight theme to OSBARCScannerActivity so Android does not treat it as a legacy light-themed activity and invert its colors when Expanded Dark Theme is enabled.

In this PR I also do a few housekeeping changes like updating PR template and commenting SonarCloud template because it was failing CI and we're not really using it atm.

Context

Expanded Dark Theme is an accessibility feature added in Android 16.1, that when enabled, was causing the scanning screen to have a white tint, because (without this fix) it was assuming the screen was not in dark mode, therefore (wrongfully) inverting the colors.

Internal jira Reference: https://outsystemsrd.atlassian.net/browse/RMET-5280

Type of changes

  • Fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Refactor (cosmetic changes)
  • Breaking change (change that would cause existing functionality to not work as expected)

Tests

I tested OutSystems Sample apps (O11 with Cordova and ODC with Capacitor). If you'd like to test yourself, refer to the following apk files in this drive folder ("before" for without this PR, "after" for with this PR): https://drive.google.com/drive/folders/1PeI7udQya5Ad4cMBTNXP0jPfUgOpenuF?usp=sharing

Screenshots (if appropriate)

The following are screenshots on a Pixel device with Android 17 and Expanded Dark Theme enabled in device settings.

Before PR After PR
pixel_android17_before pixel_android17_after

Checklist

  • Code follows code style of this project
  • CHANGELOG.md file is correctly updated
  • Changes require an update to the documentation
    • Documentation has been updated accordingly

Adds an AppCompat DayNight theme to `OSBARCScannerActivity` so Android does not treat it as a legacy light-themed app and invert its colors when Expanded Dark Theme is enabled.

References: https://outsystemsrd.atlassian.net/browse/RMET-5280
Might be 2.1.0 instead if we bundle with #55; depends on merge order / time.
Not being used these days, might as well comment to see if CI passes
@OS-pedrogustavobilro OS-pedrogustavobilro marked this pull request as ready for review June 25, 2026 17:02
@OS-pedrogustavobilro OS-pedrogustavobilro requested a review from a team as a code owner June 25, 2026 17:02
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