Class RateMyAppSendFeedbackButton

  • All Implemented Interfaces:
    RateMyAppButton, java.io.Serializable


    public class RateMyAppSendFeedbackButton
    extends BaseRateMyAppButton
    A button definition that will open a UI for the user to enter feedback.

    This button will manage the lifecycle of a FeedbackDialog. The button will also check to see if there is a RateMyAppDialog present and if there is it will dismiss it.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String FEEDBACK_DIALOG_TAG
      This is the name of the tag that will be set on the FeedbackDialog that will be created by this button.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getId()
      Gets the id that the button view will be associated with when it is created.
      java.lang.String getLabel()
      Gets the text label that will be applied to the button
      View.OnClickListener getOnClickListener()
      Gets the click listener that will be called when the button is tapped.
      void setFeedbackListener(SubmissionListener feedbackListener)
      Sets the listener that will be called when the user cancels the FeedbackDialog or uses it to send feedback.
      boolean shouldDismissDialog()
      Gets whether or not this button should dismiss the dialog after it has been clicked.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • FEEDBACK_DIALOG_TAG

        public static final java.lang.String FEEDBACK_DIALOG_TAG
        This is the name of the tag that will be set on the FeedbackDialog that will be created by this button.
        See Also:
        Constant Field Values
    • Constructor Detail

      • RateMyAppSendFeedbackButton

        public RateMyAppSendFeedbackButton(FragmentActivity fragmentActivity,
                                           FeedbackConnector connector)
        Creates a button used to send feedback. This will open a FeedbackDialog
        Parameters:
        fragmentActivity - The fragment activity that this button use to launch the feedback dialog
        connector - The connector used to send the feedback to Zendesk
    • Method Detail

      • getOnClickListener

        public View.OnClickListener getOnClickListener()
        Description copied from interface: RateMyAppButton
        Gets the click listener that will be called when the button is tapped.
        Returns:
        the android.view.View.OnClickListener that will be invoked for this button
      • getLabel

        public java.lang.String getLabel()
        Description copied from interface: RateMyAppButton
        Gets the text label that will be applied to the button
        Returns:
        The string to be applied to the RateMyAppButton
      • shouldDismissDialog

        public boolean shouldDismissDialog()
        Description copied from interface: RateMyAppButton
        Gets whether or not this button should dismiss the dialog after it has been clicked.

        Normally this will be false. The only reason to set this to true would be if you were manually adding a new dialog to be shown

        Specified by:
        shouldDismissDialog in interface RateMyAppButton
        Overrides:
        shouldDismissDialog in class BaseRateMyAppButton
        Returns:
        true if the parent dialog should be dismissed after the button is actioned, false otherwise.
      • setFeedbackListener

        public void setFeedbackListener(SubmissionListener feedbackListener)
        Sets the listener that will be called when the user cancels the FeedbackDialog or uses it to send feedback.

        This listener will be passed through to the dialog that this button manages. The listener in this class is just a conduit between the feedback dialog and what is usually the parent activity.

        Parameters:
        feedbackListener - The SubmissionListener which will be notified when events occur during the submission of the feedback