Skip to content

fix(android): reapply tintColor when Image src changes#11145

Open
owenthcarey wants to merge 1 commit intoNativeScript:mainfrom
owenthcarey:fix/android-image-tintcolor-reapply
Open

fix(android): reapply tintColor when Image src changes#11145
owenthcarey wants to merge 1 commit intoNativeScript:mainfrom
owenthcarey:fix/android-image-tintcolor-reapply

Conversation

@owenthcarey
Copy link

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:

  • onImageLoaded -- for images loaded natively via setUri (file/resource paths)
  • [imageSourceProperty.setNative] -- for images set via setImageBitmap (font icons, data URIs, ImageSource/ImageAsset)

@nx-cloud
Copy link

nx-cloud bot commented Mar 24, 2026

View your CI Pipeline Execution ↗ for commit 09312a7

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 38s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 3s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-24 22:54:42 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants