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

Add minimum and maximum ratio for the Balloon #214

Merged
merged 5 commits into from
Jul 27, 2021
Merged

Conversation

JoePaul
Copy link
Contributor

@JoePaul JoePaul commented Jul 27, 2021

Hope everything is good :) Got some more additions I would like to add. These additions makes it possible to add a min and max ratio, which works just like the min and max for pixels but with ratio instead. I also fixed so it should work with the new text measuring implementation.

@JoePaul JoePaul requested a review from skydoves as a code owner July 27, 2021 08:58
Copy link
Owner

@skydoves skydoves 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 your contributions again!
I left a comment related to a small thing.

balloon/src/main/java/com/skydoves/balloon/Balloon.kt Outdated Show resolved Hide resolved
@JoePaul
Copy link
Contributor Author

JoePaul commented Jul 27, 2021

Saw the error and fixed it now! :)

@skydoves
Copy link
Owner

Oh, sorry for making a confusion.
I meant this way:

binding.root.measuredWidth.coerceIn((displayWidth * builder.minWidthRatio).toInt(), (displayWidth * max).toInt()) - spaces

@JoePaul
Copy link
Contributor Author

JoePaul commented Jul 27, 2021

It's my bad, I hopefully fixed it now :)

@skydoves skydoves self-requested a review July 27, 2021 14:18
Copy link
Owner

@skydoves skydoves left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thanks for your contribution! 😄

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.

2 participants