Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Window::theme and WindowEvent::ThemeChanged on iOS and Android. #3994

Open
2 tasks
xorgy opened this issue Nov 11, 2024 · 0 comments
Open
2 tasks
Labels
DS - android DS - ios S - platform parity Unintended platform differences

Comments

@xorgy
Copy link
Contributor

xorgy commented Nov 11, 2024

Window::theme and WindowEvent::ThemeChanged are incomplete on some platforms, so I'm adding this here to document platform APIs I'm aware of for supporting these.

on iOS:

Window::theme can likely be implemented with UITraitEnvironment which UIView implements. WindowEvent::ThemeChanged can be triggered by a handler with registerForTraitChanges.

  • let's implement this on iOS

on Android:

Window::theme can likely be implemented by looking at Configuration from ContextThemeWrapper.getResources(); this is wired through in android-activity with ConfigurationRef::ui_mode_type.
and WindowEvent::ThemeChanged could be triggered by View.onConfigurationChanged() but this requires the manifest's <activity> element to have an android:configChanges attribute containing uiMode.
android-activity currently wires this through with MainEvent::ConfigChanged.

  • let's implement this on Android
@madsmtm madsmtm added DS - android DS - ios S - platform parity Unintended platform differences labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS - android DS - ios S - platform parity Unintended platform differences
Development

No branches or pull requests

2 participants