Skip to content

AndroidBackend: API 30 compatibility#582

Merged
stackotter merged 1 commit into
moreSwift:mainfrom
bbrk24:api-30
May 24, 2026
Merged

AndroidBackend: API 30 compatibility#582
stackotter merged 1 commit into
moreSwift:mainfrom
bbrk24:api-30

Conversation

@bbrk24
Copy link
Copy Markdown
Member

@bbrk24 bbrk24 commented May 16, 2026

This PR updates the helpers so that AndroidBackendHelpers doesn't use any functionality introduced in API 34, partially resolving #579. It still requires API 30 and crashes instantly on API 28 or 29. I also didn't touch the AlertFragment since I already did that in #581.

@bbrk24 bbrk24 requested a review from MiaKoring May 16, 2026 22:22
@MiaKoring
Copy link
Copy Markdown
Member

image

The most important part: Works!

Thank you, thats really helpful. I will give onHover a shot again once this is merged

@MiaKoring
Copy link
Copy Markdown
Member

The code changes look logical too. Basically same logic, but different source for density and basically polyfilling the one function for older versions.

Only question I have: Is there a benefit to using the function on the newer API version instead of the division / do we know what the function does internally? if the function just does a division too, it might be nicer to use it for both. Otherwise, if the function is cheaper it undoubtedly makes sense to do it like that

@bbrk24
Copy link
Copy Markdown
Member Author

bbrk24 commented May 16, 2026

Yes, starting with API 34 the relationship between SP and PX is no longer guaranteed to be linear, so a simple division is not necessarily correct.

Copy link
Copy Markdown
Member

@MiaKoring MiaKoring left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown
Collaborator

@stackotter stackotter left a comment

Choose a reason for hiding this comment

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

Thanks for resolving these compatibility issues 🙏

@stackotter stackotter merged commit c75eddf into moreSwift:main May 24, 2026
13 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.

3 participants