Closed ivnsch closed 4 years ago
Unfortunately, the balloon popup is not a view. It is a popup window. So the window can't be related to fragments back stacks or viewpager.
Okay, I'd store the tooltips in a variable and close them manually when leaving the fragment.
@skydoves is there a way to dismiss the tooltip without animating it? The close animation makes the tooltip stay a while on the screen while navigating away, which looks weird.
@i-schuetz
You can write customized animation styles.
Add below codes in your styles.xml
.
<style name="BalloonDispose">
<item name="android:windowEnterAnimation">@anim/elastic_center</item>
<item name="android:windowExitAnimation">@null</item>
</style>
There are seven types of default customized styles.
Remove setBalloonAnimation
method and use setBalloonAnimationStyle(R.style.BalloonDispose)
method. Thanks.
The problem is that I want to disable the animation only when dismissing as part of leaving the screen. I want to keep them for normal usage.
Please complete the following information:
Describe the Bug:
Settings:
When I leave the fragment (e.g. to navigate to a new fragment). The tooltips stay on the screen.
Expected Behavior:
The tooltips disappear when navigating away (backwards or forwards) from fragment.