public static class ToolTip.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder(android.content.Context context,
android.view.View anchorView,
android.view.ViewGroup root,
java.lang.CharSequence message,
int position)
Creates the tooltip builder with message and required parameters to show tooltip.
|
| Modifier and Type | Method and Description |
|---|---|
ToolTip |
build() |
ToolTip.Builder |
setAlign(int align) |
ToolTip.Builder |
setBackgroundColor(int color) |
ToolTip.Builder |
setElevation(float elevation) |
ToolTip.Builder |
setGravity(int gravity) |
ToolTip.Builder |
setOffsetX(int offset) |
ToolTip.Builder |
setOffsetY(int offset) |
ToolTip.Builder |
setPosition(int position) |
ToolTip.Builder |
setTextAppearance(int textAppearance) |
ToolTip.Builder |
setTypeface(android.graphics.Typeface typeface) |
ToolTip.Builder |
withArrow(boolean value) |
public Builder(android.content.Context context,
android.view.View anchorView,
android.view.ViewGroup root,
java.lang.CharSequence message,
int position)
context - contextanchorView - the view which near it we want to put the tiproot - a class extends ViewGroup which the created tip view will be added tomessage - message to show. Note: This allows normal text and spannable text with spanned styles.position - put the tip above / below / left to / right to anchor view.public ToolTip.Builder setPosition(int position)
public ToolTip.Builder setAlign(int align)
public ToolTip.Builder setOffsetX(int offset)
offset - offset to move the tip on x axis after tip was positionedpublic ToolTip.Builder setOffsetY(int offset)
offset - offset to move the tip on y axis after tip was positionedpublic ToolTip.Builder withArrow(boolean value)
public ToolTip.Builder setBackgroundColor(int color)
public ToolTip.Builder setElevation(float elevation)
public ToolTip.Builder setGravity(int gravity)
public ToolTip.Builder setTextAppearance(int textAppearance)
public ToolTip.Builder setTypeface(android.graphics.Typeface typeface)
public ToolTip build()