public interface UniversiActivityContext
| Modifier and Type | Method and Description |
|---|---|
void |
destroyLoader(int id)
Destroys a loader with the specified id.
|
boolean |
dismissDialogWithId(int dialogId)
Dismisses a dialog that is provided by the current dialog factory under the specified dialogId.
|
boolean |
dismissXmlDialog(int resId)
Dismisses an Xml dialog that has been shown via
showXmlDialog(int, DialogOptions). |
boolean |
finishWithNavigationalTransition()
Finishes this activity with navigational transition specified via
setNavigationalTransition(BaseNavigationalTransition)
(if any). |
DialogController |
getDialogController()
Returns the controller that can be used to show and dismiss dialogs within context of this
activity.
|
DialogFactory |
getDialogFactory()
Returns the current dialog factory specified for this activity.
|
FragmentController |
getFragmentController()
Returns the controller that can be used to show and hide fragments within context of this
activity.
|
FragmentFactory |
getFragmentFactory()
Returns the current fragment factory specified for this activity.
|
BaseNavigationalTransition |
getNavigationalTransition()
Returns the navigational transition that will be used to finish this activity.
|
<D> android.content.Loader<D> |
initLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
Initializes a loader with the specified id for the given callbacks.
|
boolean |
isActiveNetworkConnected()
Checks whether the current active network is at this time connected or not.
|
boolean |
isNetworkConnected(int networkType)
Checks whether a network with the specified networkType is at this time connected
or no.
|
<D> android.content.Loader<D> |
restartLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
Re-starts a loader with the specified id for the given callbacks.
|
void |
setDialogController(DialogController controller)
Sets a controller that should be used to show and dismiss dialogs within context of this activity.
|
void |
setDialogFactory(DialogFactory factory)
Specifies a factory that provides dialog instances for
DialogController of this activity. |
void |
setDialogXmlFactory(int xmlDialogsSet)
Specifies a factory that should provide dialog instances that can be parsed from an Xml file
with the specified xmlDialogsSet for
DialogController of this activity. |
void |
setFragmentController(FragmentController controller)
Sets a controller that should be used to show and hide fragments within context of this activity.
|
void |
setFragmentFactory(FragmentFactory factory)
Specifies a factory that provides fragment instances for
FragmentController of his activity. |
void |
setNavigationalTransition(BaseNavigationalTransition transition)
Sets a navigational transition that will be used to finish this activity context whenever
its
Activity.finishAfterTransition() is invoked. |
boolean |
showDialogWithId(int dialogId)
Same as
showDialogWithId(int, DialogOptions) with null options. |
boolean |
showDialogWithId(int dialogId,
DialogOptions options)
Shows a dialog that is provided by the current dialog factory under the specified dialogId.
|
boolean |
showXmlDialog(int resId)
Same as
showXmlDialog(int, DialogOptions) with null options. |
boolean |
showXmlDialog(int resId,
DialogOptions options)
Like
showDialogWithId(int, DialogOptions), but in this case will be used internal
instance of DialogXmlFactory to create (inflate) the desired dialog instance to be
shown. |
<D> android.content.Loader<D> |
startLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
Starts a loader with the specified id.
|
<D> android.content.Loader<D> startLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
id - Id of the desired loader to start.params - Params for loader.callbacks - Callbacks for loader.null if the specified callbacks
do not create loader for the specified id.initLoader(int, Bundle, LoaderManager.LoaderCallbacks),
restartLoader(int, Bundle, LoaderManager.LoaderCallbacks),
destroyLoader(int)<D> android.content.Loader<D> initLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
id - Id of the desired loader to init.params - Params for loader.callbacks - Callbacks for loader.null if the specified callbacks do
not create loader for the specified id.startLoader(int, Bundle, LoaderManager.LoaderCallbacks),
restartLoader(int, Bundle, LoaderManager.LoaderCallbacks),
destroyLoader(int),
LoaderManager.initLoader(int, Bundle, LoaderManager.LoaderCallbacks)<D> android.content.Loader<D> restartLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
id - Id of the desired loader to re-start.params - Params for loader.callbacks - Callbacks for loader.null if the specified callbacks do
not create loader for the specified id.startLoader(int, Bundle, LoaderManager.LoaderCallbacks),
initLoader(int, Bundle, LoaderManager.LoaderCallbacks),
destroyLoader(int),
LoaderManager.restartLoader(int, Bundle, LoaderManager.LoaderCallbacks)void destroyLoader(int id)
id - Id of the desired loader to destroy.initLoader(int, Bundle, LoaderManager.LoaderCallbacks),
restartLoader(int, Bundle, LoaderManager.LoaderCallbacks),
LoaderManager.destroyLoader(int)void setNavigationalTransition(BaseNavigationalTransition transition)
Activity.finishAfterTransition() is invoked.
If the given transition is not null this method will also configure incoming transitions
for this activity via BaseNavigationalTransition#configureIncomingTransitions(Activity).
transition - The desired transition. May be null to clear the current one.getNavigationalTransition()BaseNavigationalTransition getNavigationalTransition()
null if no transition has been specified.setNavigationalTransition(BaseNavigationalTransition)void setFragmentController(FragmentController controller)
controller - The desired controller. May be null to use the default one.getFragmentController(),
setFragmentFactory(FragmentFactory)FragmentController getFragmentController()
If not specified, instance of FragmentController is instantiated by default.
setFragmentController(FragmentController)void setFragmentFactory(FragmentFactory factory)
FragmentController of his activity.factory - The desired factory. May be null to remove the current one.getFragmentFactory(),
setFragmentController(FragmentController),
getFragmentController()FragmentFactory getFragmentFactory()
null if no factory has been specified yet.setFragmentFactory(FragmentFactory)void setDialogController(DialogController controller)
controller - The desired controller. May be null to use the default one.getDialogController(),
setFragmentFactory(FragmentFactory)DialogController getDialogController()
If not specified, instance of DialogController is instantiated by default.
setDialogController(DialogController)void setDialogXmlFactory(int xmlDialogsSet)
DialogController of this activity.xmlDialogsSet - Resource id of the desired Xml file containing Xml dialogs that the
factory should provide for this activity. May be 0 to remove the
current one.setDialogFactory(DialogFactory)void setDialogFactory(DialogFactory factory)
DialogController of this activity.factory - The desired factory. May be null to remove the current one.getDialogFactory(),
showDialogWithId(int),
showDialogWithId(int, DialogOptions)DialogFactory getDialogFactory()
null if no factory has been specified yet.setDialogFactory(DialogFactory)boolean showDialogWithId(int dialogId)
showDialogWithId(int, DialogOptions) with null options.boolean showDialogWithId(int dialogId,
DialogOptions options)
dialogId - Id of the desired dialog to show.options - Options for the dialog.True if dialog has been shown, false if this activity is currently
paused or does not have its dialog factory specified.DialogController#newRequest(int),
setDialogFactory(DialogFactory),
dismissDialogWithId(int)boolean dismissDialogWithId(int dialogId)
dialogId - Id of the desired dialog to dismiss.True if dialog has been dismissed, false if this activity is currently
paused or does not have its dialog factory specified.DialogController#newRequest(int),
showDialogWithId(int, DialogOptions)boolean showXmlDialog(int resId)
showXmlDialog(int, DialogOptions) with null options.boolean showXmlDialog(int resId,
DialogOptions options)
showDialogWithId(int, DialogOptions), but in this case will be used internal
instance of DialogXmlFactory to create (inflate) the desired dialog instance to be
shown.resId - Resource id of Xml file containing the desired dialog (its specification) to show.options - Options for the dialog.True if dialog has been successfully inflated and shown, false if
this activity is currently paused or dialog failed to be inflated.DialogXmlFactory#createDialog(int, DialogOptions),
dismissXmlDialog(int)boolean dismissXmlDialog(int resId)
showXmlDialog(int, DialogOptions).resId - Resource id of Xml file containing the desired dialog (its specification) to dismiss.True if dialog has been dismissed, false if this activity is currently
paused.showXmlDialog(int, DialogOptions)boolean isActiveNetworkConnected()
True if active network is connected, false otherwise.ConnectivityManager.getActiveNetworkInfo(),
NetworkInfo.isConnected(),
isNetworkConnected(int)boolean isNetworkConnected(int networkType)
networkType - The desired network type to check for connection.True if the requested network is connected, false otherwise.ConnectivityManager.getNetworkInfo(int),
NetworkInfo.isConnected()boolean finishWithNavigationalTransition()
setNavigationalTransition(BaseNavigationalTransition)
(if any).True if the transition has been used to finish this activity, false if
standard framework method (either Activity.finish() or Activity.finishAfterTransition()),
depending on the current API level, has been used.