-
-
Notifications
You must be signed in to change notification settings - Fork 285
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
Balloon cut off if shown from dialog fragment #131
Comments
I am also facing the same issue did you get any solution? |
Hi, @kishanvajani |
Hi @skydoves, I just played around with a dummy PopupWindow trying to find a solution for the popup been cut off some pixels outside of the parent dialog fragment. The following test Java code is from the onClick listener on a button shown in a not full screen dialog fragment.
Running it and clicking that button shows a popup that is cut off about a centimeter below the visible border of the dialog. Similar to the screenshot I added when creating this issue. With some tests I found 3 options that look like it would solve the problem (or could be used to solve it) for me.
Solution 1 looks like the best for me (min API version of my app is 26) and the real popup is not that high so that it would overlap the back and home buttons. Just high enough to not fit into the dialogs decor view. But I did not find a way to apply that flag to the popup window of the Balloon. Not even using reflection ... May I request adding an new optional callback/listener similar to OnBalloonInitializedListener but for the balloon popup window? |
Hey @holgerschlegel, |
Please complete the following information:
Describe the Bug:
In my app I use balloons to show some details on click/tip on a view. The balloon contains a recycler view as content view. Once created, the content of the recycler view (adapter) and thus the ballon is not changed. At most places of my app that works as expected.
But if such a balloon tip with a larger content is opened from within a dialog fragment, the balloon is not fully shown. It looks like it is cut off at some boundary outside the area of the dialog fragment.
Here is a screenshot:
![grafik](https://user-images.githubusercontent.com/6452504/101980035-950c3980-3c62-11eb-8f68-cdc0e20e30a3.png)
The white background in the top and left of the balloon is the dialog fragment. The gray background on the other sides is the fragment behind the dialog fragment.
As you can see by the few black dots at the bottom of the yellow balloon, there should be more text. And the rounded top corners are also a hint that the balloon is not fully shown.
Just in case you need it, here is a code fragment (in Java) that is used to create the recycler view and the balloon:
It has some not specified input parameter and I copied it together from several methods, but those are the basic commands.
I also tried adding a fixed balloon height with
setHeight(200)
. It has an effect if the balloon is shown from a "normal" fragment. But inside the dialog fragment, the result is exactly what is shown in the screenshot.Expected Behavior:
The balloon should be fully visible even if shown if used in a dialog fragment.
The text was updated successfully, but these errors were encountered: