Content-Length: 259766 | pFad | https://github.com/NativeScript/NativeScript/pull/10651

AA fix(android): Background image incorrect aspect ratio by CatchABus · Pull Request #10651 · NativeScript/NativeScript · GitHub
Skip to content
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

fix(android): Background image incorrect aspect ratio #10651

Merged

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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/NativeScript/NativeScript/pull/10651

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy