Package com.zendesk.sdk.rating.impl
Class RateMyAppSendFeedbackButton
- java.lang.Object
-
- com.zendesk.sdk.rating.impl.BaseRateMyAppButton
-
- com.zendesk.sdk.rating.impl.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 aRateMyAppDialog
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 theFeedbackDialog
that will be created by this button.
-
Constructor Summary
Constructors Constructor and Description RateMyAppSendFeedbackButton(FragmentActivity fragmentActivity, FeedbackConnector connector)
Creates a button used to send feedback.
-
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 buttonView.OnClickListener
getOnClickListener()
Gets the click listener that will be called when the button is tapped.void
setFeedbackListener(SubmissionListener feedbackListener)
Sets thelistener
that will be called when the user cancels theFeedbackDialog
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 com.zendesk.sdk.rating.impl.BaseRateMyAppButton
getStyleAttributeId
-
-
-
-
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 theFeedbackDialog
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 aFeedbackDialog
- Parameters:
fragmentActivity
- The fragment activity that this button use to launch the feedback dialogconnector
- 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 interfaceRateMyAppButton
- Overrides:
shouldDismissDialog
in classBaseRateMyAppButton
- Returns:
- true if the parent dialog should be dismissed after the button is actioned, false otherwise.
-
setFeedbackListener
public void setFeedbackListener(SubmissionListener feedbackListener)
Sets thelistener
that will be called when the user cancels theFeedbackDialog
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
- TheSubmissionListener
which will be notified when events occur during the submission of the feedback
-
getId
public int getId()
Description copied from interface:RateMyAppButton
Gets the id that the button view will be associated with when it is created.- Specified by:
getId
in interfaceRateMyAppButton
- Overrides:
getId
in classBaseRateMyAppButton
- Returns:
- the id of the button
-
-