Class DynamicTooltipPopup
java.lang.Object
com.pranavpandey.android.dynamic.support.widget.tooltip.DynamicTooltipPopup
A popup window displaying a text message aligned to a specified view.
-
Constructor Summary
ConstructorDescriptionDynamicTooltipPopup
(Context context) DynamicTooltipPopup
(Context context, int backgroundColor, int tintColor) -
Method Summary
Modifier and TypeMethodDescriptionvoid
hide()
Hide the popup if it is showing.void
set
(Drawable icon, CharSequence text) Set the popup icon and text.void
show
(View anchorView, int anchorX, int anchorY, boolean fromTouch, Drawable icon, CharSequence text) Show the popup according to the supplied values.void
show
(View anchorView, int anchorX, int anchorY, boolean fromTouch, CharSequence text) Show the popup according to the supplied values.
-
Constructor Details
-
DynamicTooltipPopup
-
DynamicTooltipPopup
-
-
Method Details
-
set
Set the popup icon and text.- Parameters:
icon
- The icon drawable for the popup.text
- The text for the popup.
-
show
public void show(@NonNull View anchorView, int anchorX, int anchorY, boolean fromTouch, @Nullable Drawable icon, @Nullable CharSequence text) Show the popup according to the supplied values.- Parameters:
anchorView
- The anchor view to attach the popup.anchorX
- The horizontal offset for the popup.anchorY
- The vertical offset for the popup.fromTouch
-true
if showing the popup from touch.icon
- The icon drawable for the popup.text
- The text for the popup.
-
show
public void show(@NonNull View anchorView, int anchorX, int anchorY, boolean fromTouch, @Nullable CharSequence text) Show the popup according to the supplied values.- Parameters:
anchorView
- The anchor view to attach the popup.anchorX
- The horizontal offset for the popup.anchorY
- The vertical offset for the popup.fromTouch
-true
if showing the popup from touch.text
- The text for the popup.
-
hide
public void hide()Hide the popup if it is showing.
-