-
Notifications
You must be signed in to change notification settings - Fork 16
Feature/legacy blur #6
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
Feature/legacy blur #6
Conversation
Introduces `LiquidGlassLegacyImpl` to provide a blur effect for devices running Android N (API 24) up to Android S (API 31). This implementation uses a CPU-based box blur for older versions and `RenderNode` for Android S. The main `LiquidGlass` view now selects `LiquidGlassLegacyImpl` for devices between Android N and Android Tiramisu, falling back to no-op for versions below N. A default blur radius is set for this legacy implementation.
QmDeve
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Thank you, but I don't have an Android 9 device here right now. I'll find out why. I tested several other devices running Android 10 but didn't encounter this problem. |
|
I also tested it on an Android 11 device, and the same problem occurred |
- Implement LiquidGlassLegacyImpl with CPU box blur for API 24-30 - Use RenderNode with RenderEffect for API 31-32 - Support blur background views below LiquidGlass - Fix box blur algorithm to prevent color bleeding
|
The blur effect seems not perfect on devices with API 32 or lower trim.2E39E7C8-0A3D-421C-BDE6-EFA78F57F58D.MOV |
|
Ok let's me fix on next commit |
This commit introduces a `borderWidth` property to the LiquidGlass effect, allowing the effect to be constrained to a border area, leaving the center transparent. It also adds a new `LiquidGlassListActivity` to demonstrate the usage of `LiquidGlassView` within a `RecyclerView`. Key changes: - Updated AGSL shader to support `borderWidth`. - Added `setBorderWidth` method to `LiquidGlassView`. - Implemented `LiquidGlassListActivity` with a `RecyclerView` and adapter. - Optimized drawing and update logic to improve performance, especially in lists. - Added Vietnamese translations.
|
Thank you for commit the changes again. However, the blur algorithm needs to be optimized Since I don’t have time right now, you can refer to my another repository: QmBlurView Once again, thank you for your contributions |


Support Blur for SDK 24 to 32