public final class DMXAndroidOptionsDialog extends android.support.v4.app.DialogFragment implements DMXDialog
AlertDialog
for use within the framework. This class provides common dialog types and some
additional method for easy integration with the framework. It is possible to display simple text messages or display DMXDialogView
instances within the dialog.STYLE_NO_FRAME, STYLE_NO_INPUT, STYLE_NO_TITLE, STYLE_NORMAL
DLG_OPTION_CANCEL, DLG_OPTION_CLOSED, DLG_OPTION_NO, DLG_OPTION_OK, DLG_OPTION_YES, DLG_TYPE_ERROR, DLG_TYPE_INFO, DLG_TYPE_PLAIN, DLG_TYPE_QUESTION, DLG_TYPE_WARNING, OPIONS_OK_CANCEL, OPTIONS_OK, OPTIONS_YES_NO, OPTIONS_YES_NO_CANCEL
Modifier | Constructor and Description |
---|---|
protected |
DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent,
DMXResourceManager resourceManager)
Basic constructor for the class.
|
|
DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent,
DMXResourceManager resourceManager,
int options,
DMXDialogView dlgView)
Create dialog with specified options which will display view specified as
dlgView parameter. |
protected |
DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent,
DMXResourceManager resourceManager,
String title)
Create dialog with specified title.
|
|
DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent,
DMXResourceManager resourceManager,
String[] options,
DMXDialogView dlgView)
Create dialog with specified options which will display view specified as
dlgView parameter. |
|
DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent,
DMXResourceManager resourceManager,
String title,
int options,
String message)
Creates new dialog with specified title, message and predefined options
set.
|
|
DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent,
DMXResourceManager resourceManager,
String title,
String[] options,
String message)
Creates new dialog with specified title, message and option buttons.
|
Modifier and Type | Method and Description |
---|---|
void |
closeDialog()
Close this dialog.
|
DMXDialogView |
getDialogView()
Returns instance of
DMXDialogView displayed by this dialog. |
android.app.Dialog |
onCreateDialog(android.os.Bundle savedInstanceState) |
void |
setCallback(DMXDialogOptionCallback callback)
Set callback interface for this dialog.
|
void |
setTag(String tag)
Sets tag for this dialog.
|
int |
showDialog()
Show this dialog.
|
dismiss, getDialog, getLayoutInflater, getShowsDialog, getTheme, isCancelable, onActivityCreated, onCancel, onCreate, onDestroyView, onDismiss, onSaveInstanceState, onStart, onStop, setCancelable, setShowsDialog, setStyle, show, show
dump, equals, getActivity, getArguments, getFragmentManager, getId, getLoaderManager, getResources, getRetainInstance, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isVisible, onActivityResult, onAttach, onConfigurationChanged, onContextItemSelected, onCreateAnimation, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroy, onDestroyOptionsMenu, onDetach, onHiddenChanged, onInflate, onLowMemory, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onViewCreated, registerForContextMenu, setArguments, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setRetainInstance, setTargetFragment, setUserVisibleHint, startActivity, startActivityForResult, toString, unregisterForContextMenu
protected DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent, DMXResourceManager resourceManager)
parent
- parent activityresourceManager
- resource managerprotected DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent, DMXResourceManager resourceManager, String title)
parent
- parent activityresourceManager
- resource managertitle
- dialog titlepublic DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent, DMXResourceManager resourceManager, String title, int options, String message)
options
is defined in DMXDialog
.parent
- parent activityresourceManager
- resource managertitle
- dialog titleoptions
- dialog options (OK, Cancel, etc.)message
- message to displaypublic DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent, DMXResourceManager resourceManager, String title, String[] options, String message)
options
should be 1, 2 or 3 element array, which
contains text to be displayed on dialog positive, negative and neutral
buttons, respectively. Array elements can either be keys to resource
strings, or actual text.parent
- parent activityresourceManager
- resource managertitle
- dialog titleoptions
- text for positive, negative and neutral buttonsmessage
- message to displaypublic DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent, DMXResourceManager resourceManager, int options, DMXDialogView dlgView)
dlgView
parameter. Dialog title is pulled from
view definition. Parameter options
is an integer representing options defined in DMXDialog
.parent
- parent activityresourceManager
- resource manageroptions
- options buttonsdlgView
- dialog view to displaypublic DMXAndroidOptionsDialog(android.support.v4.app.FragmentActivity parent, DMXResourceManager resourceManager, String[] options, DMXDialogView dlgView)
dlgView
parameter. Dialog title is pulled from
view definition. Parameter options
is an array whose elements represent a text to be displayed on dialog buttons. Thse can either
be keys for string resources, or actual text.parent
- parent activityresourceManager
- resource manageroptions
- options buttoms textdlgView
- dialog view to displaypublic void setCallback(DMXDialogOptionCallback callback)
callback
- callback interfacepublic void setTag(String tag)
My dialog
, default tag
value will be My_dialog
.tag
- dialog tagpublic android.app.Dialog onCreateDialog(android.os.Bundle savedInstanceState)
onCreateDialog
in class android.support.v4.app.DialogFragment
public int showDialog()
DMXDialog
Show this dialog. Calling this method might block calling thread until dialog is closed. This is implementation dependent.
This method can optionally return an integer value that indicates some result (for example, selected option, input value etc.).
showDialog
in interface DMXDialog
public void closeDialog()
DMXDialog
closeDialog
in interface DMXDialog
public DMXDialogView getDialogView()
DMXDialog
DMXDialogView
displayed by this dialog.getDialogView
in interface DMXDialog
Copyright © 2012-2014 Vektor Software. All Rights Reserved.