|
View your CI Pipeline Execution ↗ for commit 09312a7
☁️ Nx Cloud last updated this comment at 2026-03-24 22:54:42 UTC |
Sorry, something went wrong.
|
@owenthcarey Thanks for the PR! I tried to replicate your problem but I couldn't. The tint-color is applied using css: #img {
tint-color: red;
}
screen-20260327-190404.mp4
Also, regarding the following statement: ColorFilter is applied to the Drawable, not the ImageView itself.
The ImageView class handles the color filter internally, so it should normally be persisted between bitmap changes. Could you please create an issue related to the problem and post an app sample or a recording demonstrating the problem from your device? Maybe it could be a corner case we're unaware of. |
Sorry, something went wrong.
There was a problem hiding this comment.
Awaiting response from the author.
Sorry, something went wrong.
|
I believe this case is with dynamic bindings, not css @CatchABus - if the toolbox image-handling is run with the index.android changes commented out the issue shows itself. |
Sorry, something went wrong.
|
I believe this case is with dynamic bindings, not css @CatchABus - if the toolbox image-handling is run with the index.android changes commented out the issue shows itself. https://github.com/NativeScript/NativeScript/pull/11145/changes#diff-4a3d33d5aaebbf4b40756ca73c95fe2980910999c65e66a33334c40715c460b6R12 Thanks for pointing this out @NathanWalker. I'll check it out and continue with the review. |
Sorry, something went wrong.
|
This appears to be unique to Angular binding case, not directly represented in core (xml). We'll leave open until more clarity emerges. |
Sorry, something went wrong.
On Android, ColorFilter is applied to the Drawable, not the ImageView itself. When src changes dynamically (e.g. via binding), the new drawable replaces the old one and the tint is lost. This differs from iOS, where tintColor is a view-level property that persists across image changes.
This adds _reapplyTintColor() to the Android Image implementation and calls it from both code paths that load a new image: