tomergoldst / tooltips

Simple to use library for android, enabling to add a tooltip near any view with ease
835 stars 97 forks source link

Tooltip view going outside of parent view. #27

Closed kashifo closed 5 years ago

kashifo commented 5 years ago

Hi, I'm facing this issue, the tooltip view is going outside of the parent view (check screenshot attached).

I'm using RelativeLayout as parent and ImageView as target.


ToolTipsManager mToolTipsManager = new ToolTipsManager( toolTipDismiss );
ToolTip.Builder builder = new ToolTip.Builder(Detail_Page_Looks.this,
                        view, relSet, pojo.getPrdt_name(), tooltipPos)
                        .setBackgroundColor(getResources().getColor(R.color.black));

mToolTipsManager.dismissAll();
mToolTipsManager.show(builder.build());

Screenshot: tooltip_issue

tomergoldst commented 5 years ago

Hi, Did you use any offset values for the tooltip? Is the ImageView top left position is inside the visible window or silde out of it? Is the ImageView defined as static in the XML or its part of a list? RecyclerView?

kashifo commented 5 years ago

Hi, I didn't used any offset value for tooltip, regarding tooltip I've used only the code i typed in above comment.

I've used offset for imageview whose position is dynamic, the imageview is inside relativelayout, the imageview is not static, it's added at runtime. it's top left position is inside visible window.

tomergoldst commented 5 years ago

It's difficult to understand the issue without the code and xml Can you go into detail about offset for imageview and post your xml and relevant code?

kashifo commented 5 years ago

Hi @tomergoldst The XML has only RelativeLayout, the ImageView which is white color tag image is added to the RelativeLayout dynamically.

For my scenario this other tooltip library worked, You may close it

tomergoldst commented 5 years ago

Ok