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

getContentView() does not return the arrow #180

Closed
pratclot opened this issue Mar 30, 2021 · 3 comments
Closed

getContentView() does not return the arrow #180

pratclot opened this issue Mar 30, 2021 · 3 comments
Assignees
Labels
feature request Feature request Released Released already on the latest version.

Comments

@pratclot
Copy link

Please complete the following information:

  • Library Version 1.3.4
  • Affected Device(s) Xiaomi Mi 9

Describe the Bug:

Hi! I wanted to use just the view created by the library, so tried to get it via getContentView() call. I then used simple addView() call to add the returned view to my FrameLayout. It worked, but there was no arrow ;)

In the code it seems like the getContentView() gives us the RadiusLayout itself, omitting the arrow. I then tried to return binding.balloonWrapper, that gave me the arrow, but it was invisible (this is what Layout Inspector saw). When I executed show() on the Balloon itself the arrow was present.

I then changed arrow's visibility in the xml layout, it appeared, but did not have any margins set - they all were 0, and the color was black too (should have been blue).

Thanks!

Expected Behavior:

Wanted to get easy access to the Balloon view itself.

@skydoves
Copy link
Owner

Hi, I think we can customize almost all attributes of the arrow using the given functions.
If we want to change the color of the arrow with the custom layout, we should use .setBackgroundColor.
And could you explain why we need to access the arrow directly?

@pratclot
Copy link
Author

Yes, the functions do everything I can dream of ;)

My case was to get the whole Balloon object (together with the arrow) as a View so that I will not need to implement a balloon-like layout myself.

To be specific, I am doing some sort of a tutorial feature, and I need to add captions for highlighted views. I decided to add the captions in code, so was searching for a library that provides balloons as Views.

Hope that clears it up a bit, thanks!

@skydoves skydoves self-assigned this Apr 3, 2021
@skydoves skydoves added Release Next This feature will be released on next version feature request Feature request labels Apr 3, 2021
@skydoves
Copy link
Owner

skydoves commented Apr 3, 2021

Hi, @pratclot
A new version 1.3.4 is released.
Thanks 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 Apr 3, 2021
@skydoves skydoves closed this as completed Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request Released Released already on the latest version.
Projects
None yet
Development

No branches or pull requests

2 participants