Skip to content

Use screenDensity to layout interop views#3037

Merged
Vendula Švastalová (svastven) merged 2 commits into
jb-mainfrom
svastven/interop-density-sizing
May 11, 2026
Merged

Use screenDensity to layout interop views#3037
Vendula Švastalová (svastven) merged 2 commits into
jb-mainfrom
svastven/interop-density-sizing

Conversation

@svastven

@svastven Vendula Švastalová (svastven) commented May 8, 2026

Copy link
Copy Markdown

Fixes incorrect scaling and positioning of interop UIKitView / UIKitViewController when LocalDensity is modified

Fixes CMP-9154 [iOS] UIKitView interop incorrect position with modified density

Testing

Tests added to LocalDensityTest.kt

Release Notes

Fixes - iOS

  • Fix incorrect scaling and positioning of interop UIKitView / UIKitViewController element when LocalDensity is modified. This change does not affect scaling of factory content: UIView / UIViewController.

@svastven

Copy link
Copy Markdown
Author

relates to #3033 cc Alexander Maryanovsky (@m-sasha)

@MatkovIvan Ivan Matkov (MatkovIvan) 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.

Fix incorrect scaling and positioning

It seems only positioning is fixed here. Please re-check release notes

@svastven

Vendula Švastalová (svastven) commented May 11, 2026

Copy link
Copy Markdown
Author

Ivan Matkov (@MatkovIvan) by positioning do you also mean the scaling of the frame of the UIKitView / UIKitViewController ? because this scaling is also fixed by this PR. Not scaling of the "native" content but of the interop element.

LocalDensity.current 2 * LocalDensity.current
Simulator Screenshot - iPhone 17 Pro - 2026-05-11 at 11 41 04 Simulator Screenshot - iPhone 17 Pro - 2026-05-11 at 11 41 09

edit: updated release notes

@svastven Vendula Švastalová (svastven) changed the title Use screenDensity to layout interop views Use screenDensity to layout interop views May 11, 2026
@svastven Vendula Švastalová (svastven) merged commit eabcbcd into jb-main May 11, 2026
40 of 42 checks passed
@svastven Vendula Švastalová (svastven) deleted the svastven/interop-density-sizing branch May 11, 2026 10:45
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.

3 participants