public interface UniversiActivityContext
| Modifier and Type | Method and Description |
|---|---|
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.
|
universum.studios.android.fragment.manage.FragmentController |
getFragmentController()
Returns the controller that can be used to show and hide fragments within context of this
activity.
|
universum.studios.android.fragment.manage.FragmentFactory |
getFragmentFactory()
Returns the current fragment factory specified for this activity.
|
universum.studios.android.transition.BaseNavigationalTransition |
getNavigationalTransition()
Returns the navigational transition that will be used to finish this activity.
|
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.
|
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(universum.studios.android.fragment.manage.FragmentController controller)
Sets a controller that should be used to show and hide fragments within context of this activity.
|
void |
setFragmentFactory(universum.studios.android.fragment.manage.FragmentFactory factory)
Specifies a factory that provides fragment instances for
FragmentController of his activity. |
void |
setNavigationalTransition(universum.studios.android.transition.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. |
void setNavigationalTransition(@Nullable
universum.studios.android.transition.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()@Nullable universum.studios.android.transition.BaseNavigationalTransition getNavigationalTransition()
null if no transition has been specified.setNavigationalTransition(BaseNavigationalTransition)void setFragmentController(@Nullable
universum.studios.android.fragment.manage.FragmentController controller)
controller - The desired controller. May be null to use the default one.getFragmentController(),
setFragmentFactory(FragmentFactory)@NonNull universum.studios.android.fragment.manage.FragmentController getFragmentController()
If not specified, instance of FragmentController is instantiated by default.
setFragmentController(FragmentController)void setFragmentFactory(@Nullable
universum.studios.android.fragment.manage.FragmentFactory factory)
FragmentController of his activity.factory - The desired factory. May be null to remove the current one.getFragmentFactory(),
setFragmentController(FragmentController),
getFragmentController()@Nullable universum.studios.android.fragment.manage.FragmentFactory getFragmentFactory()
null if no factory has been specified yet.setFragmentFactory(FragmentFactory)void setDialogController(@Nullable
DialogController controller)
controller - The desired controller. May be null to use the default one.getDialogController(),
setFragmentFactory(FragmentFactory)@NonNull DialogController getDialogController()
If not specified, instance of DialogController is instantiated by default.
setDialogController(DialogController)void setDialogXmlFactory(@XmlRes
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(@Nullable
DialogFactory factory)
DialogController of this activity.factory - The desired factory. May be null to remove the current one.getDialogFactory(),
showDialogWithId(int),
showDialogWithId(int, DialogOptions)@Nullable 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,
@Nullable
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(@XmlRes
int resId)
showXmlDialog(int, DialogOptions) with null options.boolean showXmlDialog(@XmlRes
int resId,
@Nullable
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(@XmlRes
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.