Comments (11)
Cool. I tried 1.1.8-alpha02
and it seems to fix my issue 👍. Thanks
from balloon.
This also worked for me !
from balloon.
Thanks. I will try it out in my app once I have the time 👍
from balloon.
This would be fantastic to have! 👍
I just wanted to add - the arrow should also switch
sides if the tooltip is rendered above or below the
anchor view, depending on the available space.
So for example, if the tooltip is shown by using
showAlignBottom(..)
but it's actually shown
on top of the view due to the space constraints,
the arrow should switch as well.
from balloon.
This would be great. I'm not using the arrows at all currently because the place they point to is inconsistent.
from balloon.
Hi guys!
I think the suggestion looks good for positioning easier based on an anchor, so I implemented a ArrowConstraints
functionality.
/**
* ArrowConstraints determines the constraints of the arrow positioning.
* [ArrowConstraints.ALIGN_BALLOON]: aligning based on the balloon.
* [ArrowConstraints.ALIGN_ANCHOR]: aligning based on the anchor.
*/
enum class ArrowConstraints {
/** Aligning based on the balloon. */
ALIGN_BALLOON,
/** Aligning based on the anchor. */
ALIGN_ANCHOR
}
You can use like below:
setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)
Please check out the new feature works well in your environments. The version is 1.1.8-alpha01
.
from balloon.
I tried out 1.1.8-alpha01
. The arrow placement seems to work fine in general, but I'm encountering a problem when trying to have the arrow point at a menu item in a toolbar (I'm using androidx.appcompat.widget.Toolbar
from androidx.appcompat:appcompat:1.2.0-alpha01
). In that case, the arrow position is off.
Here's a screenshot (I'm trying to have the arrow point at the item with the red background):
This is the code I use to show the balloon:
val menuItemView = toolbar.findViewById<View>(R.id.my_menu_item)
Balloon.Builder(context)
.setText("Click here to get started. It's gonna be fun!")
.setPadding(16)
.setTextSize(14f)
.setArrowConstraints(ArrowConstraints.ALIGN_ANCHOR)
.setArrowOrientation(ArrowOrientation.TOP)
.build()
.showAlignBottom(menuItemView)
This might just be an oddness caused by the toolbar view.
from balloon.
@Waboodoo
Hi, thanks for checking it!
I just released another version 1.1.8-alpha02
, the problem seems that the actual position of x should be calculated on the basis of the screen. I will also keep debugging use this new version :)
from balloon.
@Waboodoo
This issue is included in the new version 1.1.8 !
Thank you for your issue :)
from balloon.
I'm experiencing this toolbar offset problem with version 1.1.9.
From within my fragment, I get hold of the anchor view like this:
final View button = requireActivity().findViewById(R.id.menu_item_settings);
Could it be that I call setSupportActionBar(myToolbar)
in my activity?
from balloon.
If anyone is wondering, It's ArrowPositionRules
in the latest versions.
from balloon.
Related Issues (20)
- android.view.WindowManager$BadTokenException: Unable to add window -- token android.view.ViewRootImpl$W@1a464cb is not valid; is your activity running? HOT 6
- Bootlop using skydoves HOT 1
- Balloon Compose: Show balloon when the compose view is visible, without user interaction HOT 2
- Showing balloon while typing HOT 6
- Content window right spacing truncating inside widget
- Working with ImageSpan HOT 6
- Check box inside layout custom menu. HOT 1
- Show next and previous item data without dismiss in recyclerview HOT 2
- Prevent Balloon on theme changed HOT 1
- Compose: provide the way to get the end of the sequentially showed balloons. Still not working after 1.6.3 HOT 3
- Shadow have its left and right shadow clipped HOT 5
- Getting some stuttering when doing fast scrolling. HOT 1
- The balloon is swallowing keyboard input. HOT 2
- can i set width and height dynamically? HOT 3
- Compose Balloon position is misplace HOT 6
- Compose elements with `fillMaxWidth()` are cut on the edge HOT 2
- Arrow is not showing HOT 9
- Corner radius not set properly HOT 2
- PopupWindow not seen By Appium HOT 4
- Make popup reappear in `onResume` after being dismissed in `onPause` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from balloon.