Skip to content

Conversation

CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Nov 15, 2024

PR Checklist

What is the current behavior?

On android, there are cases when large images used as backgrounds lose their aspect ratio.
That is due to hardcoded limits in Fetcher class that attempt to downscale bitmaps to device screen bounds at certain cases.
What I mentioned above is an old feature that's implemented since old tns-core-widgets repo.
See NativeScript/tns-core-modules-widgets#115

Here is an example of how a large image used as a background with size contain looks in both platforms.
You'll notice that the android version upscales vertically.

imageimage

What is the new behavior?

From now on, background fetched images will keep aspect ratio by default.

Result

imageScreenshot_1731629335

@NathanWalker NathanWalker merged commit eb21056 into NativeScript:main Jan 13, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants