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

[Android] Fallback logic for fluent icons #191

Merged
merged 8 commits into from
Jul 10, 2024

Conversation

singhmanp0707
Copy link
Collaborator

Related Issue

Some fluent icons don't have all the available sizes. If we provide a size which is not available for that icon then icon is not found, and unavailable icon is shown.

As part of this PR, we are writing logic to find closest available size for fluent icon. Following is an example on how it will work:

  • Imagine an icon that whose SVG assets are available in sizes 24 and 48
  • To render that icon at size xSmall (24 pixels), the logic would pick the 24px SVG asset
  • To render it at size xxSmall, the logic would also pick the 24px SVG asset
  • To render it a sizes Standard, the logic would again pick the 24px SVG asset because 32-24 < 48-32
  • To render at sizes Medium and above, the logic would pick the 48px SVG asset

We are adding new mapping of IconSize enum.

How Verified

FluentIcon

RTL

FluentIcon_RTL

singhmanp0707 and others added 3 commits July 10, 2024 14:00
@singhmanp0707 singhmanp0707 merged commit f230278 into abhipandey/fallback Jul 10, 2024
4 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