public abstract class UniversiActivity extends android.app.Activity implements UniversiActivityContext
Activity implementation that provides Universi context features via
UniversiActivityDelegate including other features described below.
requestBindData()
need to be called. This method can be invoked from any thread. If data binding request has
been registered, UniversiActivity will invoke onBindData() method whenever its view
hierarchy is already created or waits until it is created.
Marshmallow Android version. Permissions related methods like
checkSelfPermission(String) or supportRequestPermissions(String[], int) can be
invoked regardless of current Android version.UniversiCompatActivity,
UniversiFragmentDEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OKACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
UniversiActivity()
Creates a new instance of UniversiActivity.
|
| Modifier and Type | Method and Description |
|---|---|
int |
checkSelfPermission(String permission) |
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
UniversiActivityContext.showXmlDialog(int, DialogOptions). |
protected boolean |
dispatchBackPressToCurrentFragment()
Dispatches back press event to the current fragment displayed in context of this activity.
|
protected boolean |
dispatchBackPressToFragments()
Dispatches back press event to all currently visible fragments displayed in context of this
activity.
|
protected android.app.Fragment |
findCurrentFragment()
Finds currently visible fragment that is displayed in context of this activity.
|
boolean |
finishWithNavigationalTransition()
Finishes this activity with navigational transition specified via
UniversiActivityContext.setNavigationalTransition(BaseNavigationalTransition)
(if any). |
protected ActionBarFragmentAnnotationHandler |
getAnnotationHandler()
Returns handler that is responsible for annotations processing of this class and also for
handling all annotations related operations for this class.
|
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.
|
protected boolean |
onBackPress()
Invoked from
onBackPressed() to give a chance to this activity instance to consume
the back press event before it is delivered to its parent. |
void |
onBackPressed() |
protected void |
onBindData()
Invoked due to call to
requestBindData() to perform data binding specific for this
activity instance. |
protected void |
onBindViews()
Invoked from
onContentChanged() to bind all views presented within context of this
activity. |
void |
onContentChanged() |
protected void |
onCreate(android.os.Bundle savedInstanceState) |
boolean |
onCreateOptionsMenu(android.view.Menu menu) |
protected void |
onPause() |
void |
onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults) |
protected void |
onResume() |
protected boolean |
popFragmentsBackStack()
Pops stack with fragments of this activity.
|
protected void |
requestBindData()
Requests performing of data binding specific for this activity via
onBindData(). |
<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 |
setActionBar(android.widget.Toolbar toolbar) |
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 |
shouldShowRequestPermissionRationale(String permission) |
boolean |
showDialogWithId(int dialogId)
Same as
UniversiActivityContext.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
UniversiActivityContext.showXmlDialog(int, DialogOptions) with null options. |
boolean |
showXmlDialog(int resId,
DialogOptions options)
Like
UniversiActivityContext.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.
|
void |
supportRequestPermissions(String[] permissions,
int requestCode)
Invokes
Activity.requestPermissions(String[], int) on Android versions above Marshmallow
(including). |
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onConfigurationChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDestroy, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStateNotSaved, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenuapplyOverrideConfiguration, attachBaseContext, getAssets, getResources, getThemebindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiverpublic UniversiActivity()
UniversiConfig
all annotations supported by this activity class will be processed/obtained here so they can
be later used.protected ActionBarFragmentAnnotationHandler getAnnotationHandler()
IllegalStateException - If annotations processing is not enabled for the Fragments library.protected void onCreate(android.os.Bundle savedInstanceState)
onCreate in class android.app.Activitypublic <D> android.content.Loader<D> startLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
UniversiActivityContextstartLoader in interface UniversiActivityContextid - 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.UniversiActivityContext.initLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.restartLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.destroyLoader(int)public <D> android.content.Loader<D> initLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
UniversiActivityContextinitLoader in interface UniversiActivityContextid - 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.UniversiActivityContext.startLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.restartLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.destroyLoader(int),
LoaderManager.initLoader(int, Bundle, LoaderManager.LoaderCallbacks)public <D> android.content.Loader<D> restartLoader(int id,
android.os.Bundle params,
android.app.LoaderManager.LoaderCallbacks<D> callbacks)
UniversiActivityContextrestartLoader in interface UniversiActivityContextid - 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.UniversiActivityContext.startLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.initLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.destroyLoader(int),
LoaderManager.restartLoader(int, Bundle, LoaderManager.LoaderCallbacks)public void destroyLoader(int id)
UniversiActivityContextdestroyLoader in interface UniversiActivityContextid - Id of the desired loader to destroy.UniversiActivityContext.initLoader(int, Bundle, LoaderManager.LoaderCallbacks),
UniversiActivityContext.restartLoader(int, Bundle, LoaderManager.LoaderCallbacks),
LoaderManager.destroyLoader(int)public void onContentChanged()
onContentChanged in interface android.view.Window.CallbackonContentChanged in class android.app.Activitypublic void setActionBar(android.widget.Toolbar toolbar)
setActionBar in class android.app.Activityprotected void onBindViews()
onContentChanged() to bind all views presented within context of this
activity.public boolean onCreateOptionsMenu(android.view.Menu menu)
onCreateOptionsMenu in class android.app.Activitypublic void setNavigationalTransition(BaseNavigationalTransition transition)
UniversiActivityContextActivity.finishAfterTransition() is invoked.setNavigationalTransition in interface UniversiActivityContexttransition - The desired transition. Can be null to clear the current one.UniversiActivityContext.getNavigationalTransition()public BaseNavigationalTransition getNavigationalTransition()
UniversiActivityContextgetNavigationalTransition in interface UniversiActivityContextnull if no transition has been specified.UniversiActivityContext.setNavigationalTransition(BaseNavigationalTransition)public FragmentController getFragmentController()
UniversiActivityContext
If not specified, instance of FragmentController is instantiated by default.
getFragmentController in interface UniversiActivityContextUniversiActivityContext.setFragmentController(FragmentController)public void setFragmentController(FragmentController controller)
UniversiActivityContextsetFragmentController in interface UniversiActivityContextcontroller - The desired controller. Can be null to use the default one.UniversiActivityContext.getFragmentController(),
UniversiActivityContext.setFragmentFactory(FragmentFactory)public void setFragmentFactory(FragmentFactory factory)
UniversiActivityContextFragmentController of his activity.setFragmentFactory in interface UniversiActivityContextfactory - The desired factory. Can be null to remove the current one.UniversiActivityContext.getFragmentFactory(),
UniversiActivityContext.setFragmentController(FragmentController),
UniversiActivityContext.getFragmentController()public FragmentFactory getFragmentFactory()
UniversiActivityContextgetFragmentFactory in interface UniversiActivityContextnull if no factory has been specified yet.UniversiActivityContext.setFragmentFactory(FragmentFactory)public void setDialogController(DialogController controller)
UniversiActivityContextsetDialogController in interface UniversiActivityContextcontroller - The desired controller. Can be null to use the default one.UniversiActivityContext.getDialogController(),
UniversiActivityContext.setFragmentFactory(FragmentFactory)public DialogController getDialogController()
UniversiActivityContext
If not specified, instance of DialogController is instantiated by default.
getDialogController in interface UniversiActivityContextUniversiActivityContext.setDialogController(DialogController)public void setDialogXmlFactory(int xmlDialogsSet)
UniversiActivityContextDialogController of this activity.setDialogXmlFactory in interface UniversiActivityContextxmlDialogsSet - 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.UniversiActivityContext.setDialogFactory(DialogFactory)public void setDialogFactory(DialogFactory factory)
UniversiActivityContextDialogController of this activity.setDialogFactory in interface UniversiActivityContextfactory - The desired factory. Can be null to remove the current one.UniversiActivityContext.getDialogFactory(),
UniversiActivityContext.showDialogWithId(int),
UniversiActivityContext.showDialogWithId(int, DialogOptions)public DialogFactory getDialogFactory()
UniversiActivityContextgetDialogFactory in interface UniversiActivityContextnull if no factory has been specified yet.UniversiActivityContext.setDialogFactory(DialogFactory)protected void requestBindData()
onBindData().
If this activity has its view hierarchy already created onBindData() will be invoked
immediately, otherwise will wait until onContentChanged() is invoked.
This method may be invoked also from a background-thread.
protected void onBindData()
requestBindData() to perform data binding specific for this
activity instance.
This is always invoked on the UI thread.
protected void onResume()
onResume in class android.app.Activitypublic boolean isActiveNetworkConnected()
UniversiActivityContextisActiveNetworkConnected in interface UniversiActivityContextTrue if active network is connected, false otherwise.ConnectivityManager.getActiveNetworkInfo(),
NetworkInfo.isConnected(),
UniversiActivityContext.isNetworkConnected(int)public boolean isNetworkConnected(int networkType)
UniversiActivityContextisNetworkConnected in interface UniversiActivityContextnetworkType - The desired network type to check for connection.True if the requested network is connected, false otherwise.ConnectivityManager.getNetworkInfo(int),
NetworkInfo.isConnected()public int checkSelfPermission(String permission)
checkSelfPermission in class android.content.ContextWrapperpublic boolean shouldShowRequestPermissionRationale(String permission)
shouldShowRequestPermissionRationale in class android.app.Activitypublic void supportRequestPermissions(String[] permissions, int requestCode)
Activity.requestPermissions(String[], int) on Android versions above Marshmallow
(including).
Calling this method on Android versions before MARSHMALLOW will be ignored.
permissions - The desired set of permissions to request.requestCode - Code to identify this request in onRequestPermissionsResult(int, String[], int[]).public void onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults)
onRequestPermissionsResult in class android.app.Activitypublic boolean showDialogWithId(int dialogId)
UniversiActivityContextUniversiActivityContext.showDialogWithId(int, DialogOptions) with null options.showDialogWithId in interface UniversiActivityContextpublic boolean showDialogWithId(int dialogId,
DialogOptions options)
UniversiActivityContextshowDialogWithId in interface UniversiActivityContextdialogId - 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, DialogOptions),
UniversiActivityContext.setDialogFactory(DialogFactory),
UniversiActivityContext.dismissDialogWithId(int)public boolean dismissDialogWithId(int dialogId)
UniversiActivityContextdismissDialogWithId in interface UniversiActivityContextdialogId - 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),
UniversiActivityContext.showDialogWithId(int, DialogOptions)public boolean showXmlDialog(int resId)
UniversiActivityContextUniversiActivityContext.showXmlDialog(int, DialogOptions) with null options.showXmlDialog in interface UniversiActivityContextpublic boolean showXmlDialog(int resId,
DialogOptions options)
UniversiActivityContextUniversiActivityContext.showDialogWithId(int, DialogOptions), but in this case will be used internal
instance of DialogXmlFactory to create (inflate) the desired dialog instance to be
shown.showXmlDialog in interface UniversiActivityContextresId - 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),
UniversiActivityContext.dismissXmlDialog(int)public boolean dismissXmlDialog(int resId)
UniversiActivityContextUniversiActivityContext.showXmlDialog(int, DialogOptions).dismissXmlDialog in interface UniversiActivityContextresId - 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.UniversiActivityContext.showXmlDialog(int, DialogOptions)public void onBackPressed()
onBackPressed in class android.app.Activityprotected boolean onBackPress()
onBackPressed() to give a chance to this activity instance to consume
the back press event before it is delivered to its parent.
This implementation first tries to dispatch this event to one of its visible fragment via
dispatchBackPressToFragments() and if none of the currently visible fragments does
not consume the event a stack with fragments will be popped via popFragmentsBackStack().
True if the back press event has been consumed here, false otherwise.protected boolean dispatchBackPressToFragments()
This implementation calls dispatchBackPressToCurrentFragment() and returns its result.
True if some of the visible fragments has consumed the back press event,
false otherwise.BackPressWatcher#dispatchBackPress()protected boolean dispatchBackPressToCurrentFragment()
True if the current fragment has consumed the back press event, false
otherwise.findCurrentFragment(),
BackPressWatcher#dispatchBackPress()protected android.app.Fragment findCurrentFragment()
Note, that implementation of this method assumes that this activity uses FragmentController
to display its related fragments and that there may be only one fragment visible at a time,
that is in a full screen container.
null if
there is no fragment presented within fragment container of this activity at all.protected boolean popFragmentsBackStack()
True if there was some fragment popped from the stack, false if there
were no fragments to pop from.protected void onPause()
onPause in class android.app.Activitypublic boolean finishWithNavigationalTransition()
UniversiActivityContextUniversiActivityContext.setNavigationalTransition(BaseNavigationalTransition)
(if any).finishWithNavigationalTransition in interface UniversiActivityContextTrue 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.