sephiroth74 / android-target-tooltip

Create Toast like tooltips, but targets can be specified, plus custom properties and features
MIT License
1.49k stars 278 forks source link

Gravity.TOP not honored with fitToScreen=True #135

Open jcunningham77 opened 5 years ago

jcunningham77 commented 5 years ago

In versions release-2.0.1 and above, when displaying a tooltip above a view near the right margin, sending fitToScreen=True will cause that tooltip to be displayed alongside the view, instead of staggered above it.

Seems like fitToScreen flag is a newer option, as I don't see it being used in our client using version 1.3.15.

We cannot upgrade to the latest version with the tooltip truncated on the right hand side, or with it obscuring icons to the left of the anchor view.

See below examples: correctGravity_1_3_15 . <--from release 1.3.15, works great

correctGravity_1_3_15

tooltipTruncated_2_0_3 <--from release 2.0.3, truncated since we send fitToScreen=false

tooltipTruncated_2_0_3

TooltipGravityTopFail_2_0_3 <--release 2.0.3, Gravity to the left, even though sending Gravity.TOP and fitToScreen=true

TooltipGravityTopFail_2_0_3

I will attempt to fix and submit a PR.

binaykumarrana commented 4 years ago

Is this issue fixed? I am facing this issue.

Any solution to achieve like the first image and if gravity is bottom then same like first image only tooltip will be bottom.

Any help would be appreciated.

Thanks

edisonpagtakhan commented 4 years ago

Any updates on this? My anchor view is found on the upper right corner of the screen, and the tooltip should popup below that view. The tooltip gets cut off. Thanks!

RaulitoGC commented 4 years ago

Any update for this issue?

RaulitoGC commented 4 years ago

I fixed this issue using setMax() method. It split my message into two lines. I hope this will help you :)