Class DynamicSimplePopup
java.lang.Object
com.pranavpandey.android.dynamic.support.popup.base.DynamicPopup
com.pranavpandey.android.dynamic.support.popup.DynamicSimplePopup
- All Implemented Interfaces:
DynamicProductFlavor
- Direct Known Subclasses:
DynamicColorPopup
,DynamicMenuPopup
A
DynamicPopup
to show message with a title and footer action.-
Nested Class Summary
Nested classes/interfaces inherited from class com.pranavpandey.android.dynamic.support.popup.base.DynamicPopup
DynamicPopup.Type
-
Field Summary
Modifier and TypeFieldDescriptionprotected CharSequence
Action used by this popup.protected Drawable
Action drawable used by this popup.protected View.OnClickListener
Action click listener used by this popup.protected CharSequence
Message shown by this popup.protected CharSequence
Title used by this popup.Fields inherited from class com.pranavpandey.android.dynamic.support.popup.base.DynamicPopup
mAnchor, mPopupWindowColor, mViewType
-
Constructor Summary
ConstructorDescriptionDynamicSimplePopup
(View anchor) Constructor to initialize an object of this class. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build this popup and make it ready to show.Get the action used by this popup.Get the action drawable used by this popup.Get the action click listener used by this popup.protected View
Returns the footer view for the popup.protected View
Returns the header view for the popup.protected int
Returns the maximum width for the popup.Get the message used by this popup.getTitle()
Get the title used by this popup.protected View
getView()
This method will be called to return the content view for the popup.void
setAction
(CharSequence action) Set the action used by this popup.void
setActionDrawable
(Drawable drawable) Set the action drawable used by this popup.void
setActionOnClickListener
(View.OnClickListener onClickListener) Set the action click listener used by this popup.void
setMessage
(CharSequence message) Set the message used by this popup.void
setTitle
(CharSequence title) Set the title used by this popup.Methods inherited from class com.pranavpandey.android.dynamic.support.popup.base.DynamicPopup
dismiss, getAnchor, getLocationOffsetX, getLocationOffsetY, getPopupWindow, getPopupWindowColor, getProductFlavor, getSizeOffset, getViewRoot, getViewType, getWindowAnimationStyle, onCustomisePopup, setAnchor, setPopupWindowColor, setViewRoot, setViewType, show
-
Field Details
-
mTitle
Title used by this popup. -
mMessage
Message shown by this popup. -
mAction
Action used by this popup. -
mActionDrawable
Action drawable used by this popup. -
mActionOnClickListener
Action click listener used by this popup.
-
-
Constructor Details
-
DynamicSimplePopup
Constructor to initialize an object of this class.- Parameters:
anchor
- The anchor view for this popup.
-
-
Method Details
-
getTitle
Get the title used by this popup.- Returns:
- The title used by this popup.
-
setTitle
Set the title used by this popup.- Parameters:
title
- The title to be set.
-
getMessage
Get the message used by this popup.- Returns:
- The message used by this popup.
-
setMessage
Set the message used by this popup.- Parameters:
message
- The message to be set.
-
getAction
Get the action used by this popup.- Returns:
- The action used by this popup.
-
setAction
Set the action used by this popup.- Parameters:
action
- The action to be set.
-
getActionDrawable
Get the action drawable used by this popup.- Returns:
- The action drawable used by this popup.
-
setActionDrawable
Set the action drawable used by this popup.- Parameters:
drawable
- The drawable to be set.
-
getActionOnClickListener
Get the action click listener used by this popup.- Returns:
- The click listener used by this popup.
-
setActionOnClickListener
Set the action click listener used by this popup.- Parameters:
onClickListener
- The on click listener to be set.
-
getMaxWidth
protected int getMaxWidth()Description copied from class:DynamicPopup
Returns the maximum width for the popup.- Overrides:
getMaxWidth
in classDynamicPopup
- Returns:
- The maximum width for the popup.
-
build
Description copied from class:DynamicPopup
Build this popup and make it ready to show.Please call
DynamicPopup.show()
method to show the popup.- Specified by:
build
in classDynamicPopup
- Returns:
- The popup after building it according to the supplied parameters.
-
getHeaderView
Description copied from class:DynamicPopup
Returns the header view for the popup.Default is
null
to hide the header.- Overrides:
getHeaderView
in classDynamicPopup
- Returns:
- The header view for the popup.
-
getView
Description copied from class:DynamicPopup
This method will be called to return the content view for the popup.- Specified by:
getView
in classDynamicPopup
- Returns:
- The content view for the popup.
-