public class DefaultDialogManager extends Object implements DialogManager
DefaultDialogManager Class - default dialog manager class implements DialogManager
interface of the AndroidRate library.
You can extend DefaultDialogManager Class and use
AppRate.setDialogManagerFactory(DialogManager.Factory)
if you want to use fully custom
dialog (from v7 AppCompat library etc.). DefaultDialogManager Class is thread-safe and a fast
singleton implementation inside library, not outside (protected, not private constructor).
DefaultDialogManager.Factory
,
DialogManager
Modifier and Type | Field and Description |
---|---|
protected Context |
context |
protected DialogOptions |
dialogOptions |
protected DialogInterface.OnDismissListener |
dismissListener |
protected DialogInterface.OnClickListener |
negativeListener |
protected DialogInterface.OnClickListener |
neutralListener |
protected DialogInterface.OnClickListener |
positiveListener |
protected DialogInterface.OnShowListener |
showListener |
Modifier | Constructor and Description |
---|---|
protected |
DefaultDialogManager(Context context,
DialogOptions dialogOptions,
StoreOptions storeOptions) |
Modifier and Type | Method and Description |
---|---|
Dialog |
createDialog()
Creates Rate Dialog.
|
protected AlertDialog.Builder |
getDialogBuilder(Context context,
int themeResId)
Creates
AlertDialog.Builder . |
protected void |
setContext(Context context) |
protected final DialogOptions dialogOptions
protected Context context
protected final DialogInterface.OnShowListener showListener
protected final DialogInterface.OnDismissListener dismissListener
protected final DialogInterface.OnClickListener positiveListener
protected final DialogInterface.OnClickListener negativeListener
protected final DialogInterface.OnClickListener neutralListener
protected DefaultDialogManager(Context context, DialogOptions dialogOptions, StoreOptions storeOptions)
protected void setContext(Context context)
@Nullable protected AlertDialog.Builder getDialogBuilder(@NonNull Context context, int themeResId)
Creates AlertDialog.Builder
.
context
- activity contextthemeResId
- theme resource IDAlertDialog.Builder
object@Nullable public Dialog createDialog()
Creates Rate Dialog.
createDialog
in interface DialogManager