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: floating number problem on android #649

Merged
merged 3 commits into from
Sep 27, 2024

Conversation

draggie
Copy link
Contributor

@draggie draggie commented Sep 18, 2024

Summary:

fixes: #634
Resolves case 1 from the issue - when using floating numbers like in example for step size, min and max value it could result in unexpected number of steps

Test Plan:

Tested on android the case from example and some other floats

@draggie draggie self-assigned this Sep 18, 2024
Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

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

This solution breaks any Slider, that already uses step like 0.001, 0.0001, and so on.
I know it sounds rare to have such settings, but we can't say there are none who doesn't have such settings.
Only two-decimal-digits Sliders, and bigger will work after that change.
I think we should take the time to think about safer solution to avoid regression 😟

Copy link
Member

@BartoszKlonowski BartoszKlonowski left a comment

Choose a reason for hiding this comment

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

Looks good, especially that we use double for the value itself.
Thanks 👍

@BartoszKlonowski BartoszKlonowski merged commit 7986cc0 into main Sep 27, 2024
9 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.

Android multiple issues: too many steps, disabling removes minimumTrackTintColor, extra space
2 participants