Skip to content

fix(android): size background images with one auto axis (fix #60346) - #60353

Merged
intergalacticspacehighway merged 2 commits into
react:mainfrom
joyhsia:fix/60346-size-background-images
Nov 28, 2026
Merged

intergalacticspacehighway merged 2 commits into
react:mainfrom
joyhsia:fix/60346-size-background-images

Conversation

@joyhsia

@joyhsia joyhsia commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Android currently ignores a specified backgroundSize dimension whenever the other axis is auto. The sizing calculation now resolves width and height independently, preserving the positioning-area size for the auto axis and keeping explicit lengths or percentages on the other axis.

Changelog

[ANDROID] [FIXED] - Resolve explicit backgroundSize axes independently when the other axis is auto.

Test Plan

  • git diff --check — passed.
  • Added Kotlin coverage for a one-axis auto size and for two explicit axes.
  • The focused Gradle unit test is left for GitHub CI because this workspace has no JDK or Android SDK.

Fixes #60346

@meta-cla

meta-cla Bot commented Nov 27, 2026

Copy link
Copy Markdown

Hi @joyhsia!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@github-actions github-actions Bot added the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Nov 27, 2026
@joyhsia
joyhsia marked this pull request as ready for review November 27, 2026 21:41
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 28, 2026
@meta-cla

meta-cla Bot commented Nov 28, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 28, 2026

@intergalacticspacehighway intergalacticspacehighway left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@intergalacticspacehighway
intergalacticspacehighway merged commit 94aee19 into react:main Nov 28, 2026
55 checks passed
@github-actions

Copy link
Copy Markdown

Visual regression

No visual differences at 4cd98f4186df.

ios: no capture

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android: a backgroundSize with one auto axis is ignored, so '20px auto' draws a gradient over the whole view instead of a 20px tile

2 participants