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

Option for changing text alignment. #41

Closed
gavingt opened this issue Apr 24, 2020 · 1 comment
Closed

Option for changing text alignment. #41

gavingt opened this issue Apr 24, 2020 · 1 comment

Comments

@gavingt
Copy link

gavingt commented Apr 24, 2020

The text is always centered in the Balloon without any way to change it. I think left-aligned text looks better for large chunks of text, so I'd like an option to set this.

I've tried doing this with a custom layout, but the text always gets cut off after one line (unless I explicitly set the height, which isn't feasible for me).

EDIT: nevermind, I was able to hack around it:

    TextView textView = balloon.getContentView().findViewById(R.id.balloon_text);
    textView.setGravity(Gravity.LEFT);
@gavingt gavingt closed this as completed Apr 24, 2020
@ghost
Copy link

ghost commented Jun 18, 2020

I just opened an enhancement as I needed the same thing. Although it would work I would prefer official API as there is always the possibility that the internal IDs might change in the future and it would break you "hack" if you update the library. As seen that its not hard to do, I would prefer an official method that can basically do the exact thing above to align the text.

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

No branches or pull requests

1 participant