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

public class DynamicSimplePopup extends DynamicPopup
A DynamicPopup to show message with a title and footer action.
  • Field Details

    • mTitle

      protected CharSequence mTitle
      Title used by this popup.
    • mMessage

      protected CharSequence mMessage
      Message shown by this popup.
    • mAction

      protected CharSequence mAction
      Action used by this popup.
    • mActionDrawable

      protected Drawable mActionDrawable
      Action drawable used by this popup.
    • mActionOnClickListener

      protected View.OnClickListener mActionOnClickListener
      Action click listener used by this popup.
  • Constructor Details

    • DynamicSimplePopup

      public DynamicSimplePopup(@NonNull View anchor)
      Constructor to initialize an object of this class.
      Parameters:
      anchor - The anchor view for this popup.
  • Method Details

    • getTitle

      @Nullable public CharSequence getTitle()
      Get the title used by this popup.
      Returns:
      The title used by this popup.
    • setTitle

      public void setTitle(@Nullable CharSequence title)
      Set the title used by this popup.
      Parameters:
      title - The title to be set.
    • getMessage

      @Nullable public CharSequence getMessage()
      Get the message used by this popup.
      Returns:
      The message used by this popup.
    • setMessage

      public void setMessage(@Nullable CharSequence message)
      Set the message used by this popup.
      Parameters:
      message - The message to be set.
    • getAction

      @Nullable public CharSequence getAction()
      Get the action used by this popup.
      Returns:
      The action used by this popup.
    • setAction

      public void setAction(@Nullable CharSequence action)
      Set the action used by this popup.
      Parameters:
      action - The action to be set.
    • getActionDrawable

      @Nullable public Drawable getActionDrawable()
      Get the action drawable used by this popup.
      Returns:
      The action drawable used by this popup.
    • setActionDrawable

      public void setActionDrawable(@Nullable Drawable drawable)
      Set the action drawable used by this popup.
      Parameters:
      drawable - The drawable to be set.
    • getActionOnClickListener

      @Nullable public View.OnClickListener getActionOnClickListener()
      Get the action click listener used by this popup.
      Returns:
      The click listener used by this popup.
    • setActionOnClickListener

      public void setActionOnClickListener(@Nullable View.OnClickListener onClickListener)
      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 class DynamicPopup
      Returns:
      The maximum width for the popup.
    • build

      @NonNull public DynamicPopup 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 class DynamicPopup
      Returns:
      The popup after building it according to the supplied parameters.
    • getHeaderView

      @Nullable protected View getHeaderView()
      Description copied from class: DynamicPopup
      Returns the header view for the popup.

      Default is null to hide the header.

      Overrides:
      getHeaderView in class DynamicPopup
      Returns:
      The header view for the popup.
    • getView

      @Nullable protected View getView()
      Description copied from class: DynamicPopup
      This method will be called to return the content view for the popup.
      Specified by:
      getView in class DynamicPopup
      Returns:
      The content view for the popup.
    • getFooterView

      @Nullable protected View getFooterView()
      Description copied from class: DynamicPopup
      Returns the footer view for the popup.

      Default is null to hide the footer.

      Overrides:
      getFooterView in class DynamicPopup
      Returns:
      The footer view for the popup.