android-tooltips
android-tooltips copied to clipboard
Could not place tooltip atop of target view with WRAP_CONTENT prop for width.
Is there any way to align a tooltip with Gravity.TOP set with a WRAP_CONTENT width just above target view?
E.g.
Code involved:
View contentView = createToolTipView("Tooltip above the button",
Color.BLACK, getResources().getColor(android.R.color.holo_green_light));
contentView.setLayoutParams(new ViewGroup.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT,
ViewGroup.LayoutParams.WRAP_CONTENT
));
ToolTip t = new Builder(callingActivity)
.anchor(targetView)
.color(getResources().getColor(android.R.color.holo_green_light))
.gravity(Gravity.TOP)
.pointerSize(15)
.contentView(contentView)
.build();
tipContainer.addTooltip(t);