Skip to content

Respect runtime appearance overrides in Android renderers - #84

Closed
jeremyfrancis55 wants to merge 1 commit into
NativePHP:mainfrom
jeremyfrancis55:fix/respect-runtime-appearance
Closed

Respect runtime appearance overrides in Android renderers#84
jeremyfrancis55 wants to merge 1 commit into
NativePHP:mainfrom
jeremyfrancis55:fix/respect-runtime-appearance

Conversation

@jeremyfrancis55

Copy link
Copy Markdown

Summary

  • replace direct isSystemInDarkTheme() reads across Android native UI renderers
  • consume the app-local NativeAppearanceState supplied by NativePHP core
  • cover the renderer contract with a source-level regression test

Problem

The core Material theme and node backgrounds can recompose for a runtime light/dark override, but individual plugin renderers still read only the device-wide mode. That leaves text, icons, inputs, buttons, dialogs, and other controls in the old palette unless Android recreates the activity. Activity recreation restarts the NativePHP host and can clear an authenticated runtime session.

Using the shared snapshot state makes every renderer update in place without an activity relaunch.

Dependency

Requires NativePHP/mobile-air#412: NativePHP/mobile-air#412

Testing

  • 218 tests, 777 assertions: pass
  • Pint formatting check: pass
  • Android Gradle :app:assembleDebug: pass in a NativePHP app with both changes
  • emulator dark -> light -> dark: full native UI updates, PID remains unchanged, no activity relaunch

@jeremyfrancis55

Copy link
Copy Markdown
Author

I realized I can just store the logged in credentials in secure storage..

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