Package com.zendesk.sdk.rating.ui
Class RateMyAppDialog
- java.lang.Object
-
- DialogFragment
-
- com.zendesk.sdk.ui.ZendeskDialog
-
- com.zendesk.sdk.rating.ui.RateMyAppDialog
-
- All Implemented Interfaces:
- java.io.Serializable
public class RateMyAppDialog extends ZendeskDialog implements java.io.Serializable
This is aDialogFragment
that will show a rate my app dialog.An instance of this dialog should be obtained using the
Builder
. After you have created an instance you should use theshow
method to show the dialog. The dialog may or may not show depending on the configuration that has been retrieved from the server.Any checking of whether the dialog can be shown happens in the
RateMyAppDialog#show(android.support.v4.app.FragmentActivity)
method. This means that the number of launches is incremented when you call it and it also performs other checks such as how long the dialog must wait before becoming eligible to run.A full example of how to use the dialog is available in the "RateMyAppdialogTest" activity in the "SampleApp" project
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
RateMyAppDialog.Builder
Builder class used to instantiate aRateMyAppDialog
static interface
RateMyAppDialog.OnShowListener
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
RMA_DIALOG_TAG
-
Constructor Summary
Constructors Constructor and Description RateMyAppDialog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Dialog
onCreateDialog(Bundle savedInstanceState)
View
onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
void
onStart()
void
show(FragmentActivity fragmentActivity)
Shows the dialog if it is eligible to be shown.void
show(FragmentActivity fragmentActivity, boolean overrideShowDelay)
Shows the dialog if it is eligible to be shown.void
showAlways(FragmentActivity fragmentActivity)
This method can be used to always show the dialog.void
tearDownDialog(FragmentManager fragmentManager)
This method can be used to tear down the RateMyAppDialog and also theContactZendeskFragment
if it has been shown.-
Methods inherited from class com.zendesk.sdk.ui.ZendeskDialog
onCreate
-
-
-
-
Field Detail
-
RMA_DIALOG_TAG
public static final java.lang.String RMA_DIALOG_TAG
- See Also:
- Constant Field Values
-
-
Method Detail
-
onCreateView
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
-
onStart
public void onStart()
- Overrides:
onStart
in classZendeskDialog
-
showAlways
public void showAlways(FragmentActivity fragmentActivity)
This method can be used to always show the dialog. This doesn't respect the settings that come from the server or whether the user has already clicked a button to not display the dialog again.- Parameters:
fragmentActivity
- The FragmentActivity to which this Fragment will be attached to.
-
show
public void show(FragmentActivity fragmentActivity)
Shows the dialog if it is eligible to be shown.- Parameters:
fragmentActivity
- The FragmentActivity to which this Fragment will be attached to.
-
show
public void show(FragmentActivity fragmentActivity, boolean overrideShowDelay)
Shows the dialog if it is eligible to be shown.- Parameters:
fragmentActivity
- The FragmentActivity to which this Fragment will be attached to. Only a WeakReference to it is retained by this method.overrideShowDelay
- If true the dialog will be shown immediately if it is eligible to be shown. Otherwise the dialog will show after the configuration specified delay.
-
onCreateDialog
public Dialog onCreateDialog(Bundle savedInstanceState)
-
tearDownDialog
public void tearDownDialog(FragmentManager fragmentManager)
This method can be used to tear down the RateMyAppDialog and also theContactZendeskFragment
if it has been shown.- Parameters:
fragmentManager
- The fragment manager in which transactions will run to remove the fragments
-
-