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

Text/images cut off on sides #42

Closed
gavingt opened this issue Apr 26, 2020 · 10 comments
Closed

Text/images cut off on sides #42

gavingt opened this issue Apr 26, 2020 · 10 comments
Assignees
Labels
bug Something isn't working Released Released already on the latest version.

Comments

@gavingt
Copy link

gavingt commented Apr 26, 2020

If the width of the Balloon is close to the width of the content inside it, the content gets cut off on the left and right sides.

I've tried playing with various builder methods to fix this, and nothing does.

Screenshot_1587902594

@skydoves
Copy link
Owner

Hi, @gavingt could you let me know about your device information?

@gavingt
Copy link
Author

gavingt commented Apr 26, 2020

It's happening on all devices. The above screenshot is from a Nexus S API 28 emulator.

Here's my physical Pixel 3 on API 29:

Screenshot_20200426-061555

And here's another emulator (Nexus 5X API 26):

Screenshot_1587907158

All I'm doing is changing the text string in the sample app. Once it reaches a certain length, the text and icon get cut off.

@skydoves
Copy link
Owner

Hmm. I built using Nexus 5X API 26, Gallaxy s7/10 but it works fine.
I will check its details more.

screenshot389987803

@gavingt
Copy link
Author

gavingt commented Apr 26, 2020

If the text is long enough, it will wrap around to the next line and nothing will be cut off. But if it's just the right length, it will get cut off.

In other words, if the string just barely fits in one line, it'll be cut off.

@skydoves skydoves self-assigned this May 12, 2020
@skydoves skydoves added bug Something isn't working Release Next This feature will be released on next version labels May 14, 2020
@NikoBoerger
Copy link

Just ran into the same issue. Glad someone reported it already. Will it come in version 1.1.7? Thank you!

@skydoves
Copy link
Owner

Hi, this issue will be resolved in the next version.
Thank you :)

@skydoves
Copy link
Owner

Hi, @gavingt , @NikoBoerger
It is fixed on the new version 1.1.7.
Thank you for your issue :)

@skydoves skydoves added Released Released already on the latest version. and removed Release Next This feature will be released on next version labels May 17, 2020
@NikoBoerger
Copy link

Hi @skydoves,
thank you so much for the fix. It works great on most of my devices. However, on my Samsung Tablet I still experience the Icon being cut at the left side, and the text being cut on the right side with the version 1.1.7. Exactly like on the initial screenshot from gavingt.

This is my setting:

public static Balloon.Builder createBalloonBuilder(View view, Activity activity) {
        return new Balloon.Builder(activity)
                .setArrowSize((int) toDp(R.dimen._10sdp, activity))
                .setArrowOrientation(ArrowOrientation.TOP)
                .setArrowVisible(true)
                .setArrowPosition(calculateArrowPosition(view, activity))
                .setWidthRatio(1.0f)
                .setPaddingTop((int) toDp(R.dimen._10sdp, activity))
                .setPaddingBottom((int) toDp(R.dimen._10sdp, activity))
                .setTextSize(toDp(R.dimen._12sdp, activity))
                .setCornerRadius(toDp(R.dimen._4sdp, activity))
                .setAlpha(0.95f)
                .setIconSize((int) toDp(R.dimen._20sdp, activity))
                .setPaddingLeft((int) toDp(R.dimen._10sdp, activity))
                .setPaddingRight((int) toDp(R.dimen._10sdp, activity))
                .setTextColor(ContextCompat.getColor(activity, R.color.colorPrimaryDark))
                .setBackgroundColor(ContextCompat.getColor(activity, R.color.colorPrimary100))
                .setBalloonAnimation(BalloonAnimation.FADE)
                .setDismissWhenTouchOutside(true)
                .setDismissWhenClicked(true);
    } 

Screenshot_20200517-173838_Dart Pro Training Sheet

@skydoves
Copy link
Owner

Hi, @NikoBoerger
I just re-published the 1.1.7 version.
Please run below command and rebuild your project.

./gradlew build --refresh-dependencies

@gavingt
Copy link
Author

gavingt commented May 17, 2020

This seems solved to me. I'm not getting text or icons cut off on any of my devices. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Released Released already on the latest version.
Projects
None yet
Development

No branches or pull requests

3 participants