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
FieldsModifier and TypeFieldDescriptionprotected CharSequenceAction used by this popup.protected DrawableAction drawable used by this popup.protected View.OnClickListenerAction click listener used by this popup.protected CharSequenceMessage shown by this popup.protected CharSequenceTitle used by this popup.Fields inherited from class com.pranavpandey.android.dynamic.support.popup.base.DynamicPopup
mAnchor, mPopupWindowColor, mViewType -
Constructor Summary
ConstructorsConstructorDescriptionDynamicSimplePopup(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 ViewReturns the footer view for the popup.protected ViewReturns the header view for the popup.protected intReturns the maximum width for the popup.Get the message used by this popup.getTitle()Get the title used by this popup.protected ViewgetView()This method will be called to return the content view for the popup.voidsetAction(CharSequence action) Set the action used by this popup.voidsetActionDrawable(Drawable drawable) Set the action drawable used by this popup.voidsetActionOnClickListener(View.OnClickListener onClickListener) Set the action click listener used by this popup.voidsetMessage(CharSequence message) Set the message used by this popup.voidsetTitle(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:DynamicPopupReturns the maximum width for the popup.- Overrides:
getMaxWidthin classDynamicPopup- Returns:
- The maximum width for the popup.
-
build
Description copied from class:DynamicPopupBuild this popup and make it ready to show.Please call
DynamicPopup.show()method to show the popup.- Specified by:
buildin classDynamicPopup- Returns:
- The popup after building it according to the supplied parameters.
-
getHeaderView
Description copied from class:DynamicPopupReturns the header view for the popup.Default is
nullto hide the header.- Overrides:
getHeaderViewin classDynamicPopup- Returns:
- The header view for the popup.
-
getView
Description copied from class:DynamicPopupThis method will be called to return the content view for the popup.- Specified by:
getViewin classDynamicPopup- Returns:
- The content view for the popup.
-