fix(android): update overlay color based on the UI mode of devices#45
Merged
Conversation
…n the UI mode new configuration
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Android blur overlay behavior to react to device UI mode (light/dark) changes, and simplifies the React Native-side downscaleFactor handling while updating documentation/examples accordingly.
Changes:
- Android: Make overlay color resolution UI-mode-aware and refresh overlay color on configuration changes.
- React Native: Remove
downscaleFactorscaling logic and refactor howrefis passed to the nativeBlurcomponent. - Docs/examples: Update TypeScript ref examples and adjust Android platform notes.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/BlurView.tsx | Removes downscaleFactor scaling logic and moves ref passing into shared native props. |
| src/BlurTarget.tsx | Updates example snippet to type the ref as useRef<View | null>(null). |
| README.md | Updates Android platform behavior notes (radius/downscaleFactor discussion). |
| example/ios/Podfile.lock | Updates the example iOS pod lock entry for BlurView to 2.3.1. |
| android/src/main/java/com/blurview/BlurView.kt | Persists overlay type string and refreshes overlay color on configuration changes; updates overlay resolution to use configuration. |
| android/src/main/java/com/blurview/BlurOverlayColor.kt | Makes overlay mapping UI-mode-aware by selecting light/dark variants for several blur types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary 📋
Update overlay color based on the UI mode of devices.
React Native ⚛️
downscaleFactorproperty.Android 🤖
onConfigurationChangedmethod to update overlay color based on the UI mode of devices.iOS 🍎
--
References 💬