-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Ballon with custom layout: removeView exception #281
Comments
Hi @skydoves. Thanks for the feedback. I've tested the snapshot version and still see the error:
It is just two lines below the old error |
@m1ga, |
It's a bit more complicated 😄 I'm creating a module for Appcelerator Titanium so you can create your views in XML/JS and show it with the help of your module Inside PopoverView I'm receiving the Titanium View (TiUIVIew) as a parameter and get it's native View. Then after that the Balloon part is here. So I have to make sure somehow that my layout doesn't have any more parents? In fact I had a version running once where it opened every click but I ended up in getting a new balloon arrow add to my view every time. Later on in Titanium you wrap the content of the popup like this <Popover module="ti.popover" id="popover">
<View id="contentView">
<ImageView id="img"/>
<Label text="test" id="lbl"/>
</View>
</Popover> and can run $.popover.show({
view: cv,
direction: direction
}) but don't want to bother you with framework insides 😄 |
Thanks for your very details. 😄 If you don't have to maintain the original view hierarchies of the root view, you can achieve it like the example below: ViewGroup parentView = customView.getParent();
if (parentView != null) {
parentView.removeView(customView);
}
balloonBuilder.setLayout(customView); |
Ok, that is an embarrassing easy fix 🤣 |
That's great to hear that. 😄 |
Please complete the following information:
Describe the Bug:
When running the following code with a custom Layout:
I receive this error when calling it the second time:
There was am older issue #149 that already fixed some places. This might be another one.
Expected Behavior:
No expception, being able to create another ballon with me options.
The text was updated successfully, but these errors were encountered: