sTooltip
sTooltip copied to clipboard
Arrow don't align to refView
When tooltip width very large, example == screen width, the arrow aways on center of tooltip, if refView not center in window, arrow will not align center to refView.
Proposal solutions:
- arrow position flow on tooltip to align to refView
- provide set tooltip window width method
Hi @tao-glow thanks for you feedback, can you provide me some code example to reproduce the issue? i like your proposal solutions
I was experiencing a similar issue when trying to anchor to a toolbar's action icon. I still wanted the tooltip to be positioned bottom, but the arrow was center aligned and my tooltip was full screen width.
Hi @tao-glow thanks for you feedback, can you provide me some code example to reproduce the issue? i like your proposal solutions
anchorView is on screen bottom right
tooltip = Tooltip.on(anchorView)
.text("a long string : xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxxxxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx")
.textGravity(Gravity.CENTER_HORIZONTAL)
.color(getResources().getColor(R.color.colorPrimary))
.border(0, 0)
.clickToHide(false)
.corner(dp8)
.arrowSize(dp8, (int) (dp8*1.4f))
.position(Position.TOP)
.displayListener(new DisplayListener() {
@Override
public void onDisplay(View view, boolean show) {
//TODO
}
})
.tooltipClickListener(new TooltipClickListener() {
@Override
public void onClick(View v, Tooltip tooltip) {
tooltip.close();
//TODO
}
}).show(5000);
@jesualex hi! Do you plan to update this issue? Not aligned arrow makes this library unusable. I would hate to switch to another library because of that. Version 1 was working just fine, but 1.5.1 doesn't work as expected. Thanks!
hi @AlienAsRoger, i am currently fixing this issue and adding more possibilities for the tooltip, unfortunately i can spend little daily time in the advance, but this project has not been abandoned, for now if version 1 works for you use it meanwhile.