public abstract class UniversiCompatActivity extends androidx.appcompat.app.AppCompatActivity implements UniversiActivityContext
AppCompatActivity implementation with same Universi context features provided
as UniversiActivity.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, COMPANION_DEVICE_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, CROSS_PROFILE_APPS_SERVICE, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, EUICC_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, IPSEC_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, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_RANGING_SERVICE, WIFI_SERVICE, WINDOW_SERVICE| Constructor and Description |
|---|
UniversiCompatActivity()
Creates a new instance of UniversiCompatActivity.
|
| Modifier and Type | Method and Description |
|---|---|
int |
checkSelfPermission(String permission) |
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 androidx.fragment.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 universum.studios.android.fragment.annotation.handler.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.
|
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.
|
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 |
onDestroy() |
protected void |
onPause() |
void |
onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults) |
protected void |
onResume() |
protected void |
onSaveInstanceState(android.os.Bundle state) |
void |
onSaveInstanceState(android.os.Bundle state,
android.os.PersistableBundle persistentState) |
protected boolean |
popFragmentsBackStack()
Pops stack with fragments of this activity.
|
protected void |
requestBindData()
Requests performing of data binding specific for this activity via
onBindData(). |
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. |
void |
setSupportActionBar(androidx.appcompat.widget.Toolbar toolbar) |
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. |
void |
supportRequestPermissions(String[] permissions,
int requestCode)
Invokes
Activity.requestPermissions(String[], int) on Android versions above Marshmallow
(including). |
addContentView, closeOptionsMenu, dispatchKeyEvent, findViewById, getDelegate, getDrawerToggleDelegate, getMenuInflater, getResources, getSupportActionBar, getSupportParentActivityIntent, invalidateOptionsMenu, onConfigurationChanged, onCreateSupportNavigateUpTaskStack, onKeyDown, onMenuItemSelected, onMenuOpened, onPanelClosed, onPostCreate, onPostResume, onPrepareSupportNavigateUpTaskStack, onStart, onStop, onSupportActionModeFinished, onSupportActionModeStarted, onSupportContentChanged, onSupportNavigateUp, onTitleChanged, onWindowStartingSupportActionMode, openOptionsMenu, setContentView, setContentView, setContentView, setSupportProgress, setSupportProgressBarIndeterminate, setSupportProgressBarIndeterminateVisibility, setSupportProgressBarVisibility, setTheme, startSupportActionMode, supportInvalidateOptionsMenu, supportNavigateUpTo, supportRequestWindowFeature, supportShouldUpRecreateTaskdump, getLastCustomNonConfigurationInstance, getLifecycle, getSupportFragmentManager, getSupportLoaderManager, getViewModelStore, onActivityResult, onAttachFragment, onCreatePanelMenu, onCreateView, onCreateView, onLowMemory, onMultiWindowModeChanged, onNewIntent, onPictureInPictureModeChanged, onPrepareOptionsPanel, onPreparePanel, onResumeFragments, onRetainCustomNonConfigurationInstance, onRetainNonConfigurationInstance, onStateNotSaved, setEnterSharedElementCallback, setExitSharedElementCallback, startActivityForResult, startActivityForResult, startActivityFromFragment, startActivityFromFragment, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromFragment, supportFinishAfterTransition, supportPostponeEnterTransition, supportStartPostponedEnterTransition, validateRequestPermissionsRequestCodedispatchKeyShortcutEvent, getExtraData, putExtraData, superDispatchKeyEventattachBaseContext, closeContextMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, enterPictureInPictureMode, enterPictureInPictureMode, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onChildTitleChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreatePanelView, onCreateThumbnail, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPostCreate, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestart, onRestoreInstanceState, onRestoreInstanceState, onSearchRequested, onSearchRequested, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setContentTransitionManager, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setShowWhenLocked, setTaskDescription, setTitle, setTitle, setTitleColor, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenuapplyOverrideConfiguration, getAssets, getThemebindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createContextForSplit, 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, getMainExecutor, 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, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterReceivergetColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbackspublic UniversiCompatActivity()
FragmentAnnotations.setEnabled(boolean) all annotations supported by this activity
class will be processed/obtained here so they can be later used.@NonNull protected universum.studios.android.fragment.annotation.handler.ActionBarFragmentAnnotationHandler getAnnotationHandler()
IllegalStateException - If annotations processing is not enabled for the Fragments library.protected void onCreate(@Nullable
android.os.Bundle savedInstanceState)
onCreate in class androidx.appcompat.app.AppCompatActivitypublic void onContentChanged()
onContentChanged in interface android.view.Window.CallbackonContentChanged in class androidx.appcompat.app.AppCompatActivitypublic void setSupportActionBar(@Nullable
androidx.appcompat.widget.Toolbar toolbar)
setSupportActionBar in class androidx.appcompat.app.AppCompatActivityprotected void onBindViews()
onContentChanged() to bind all views presented within context of this
activity.public boolean onCreateOptionsMenu(@NonNull
android.view.Menu menu)
onCreateOptionsMenu in class android.app.Activitypublic void setNavigationalTransition(@Nullable
universum.studios.android.transition.BaseNavigationalTransition transition)
UniversiActivityContextActivity.finishAfterTransition() is invoked.
If the given transition is not null this method will also configure incoming transitions
for this activity via BaseNavigationalTransition.configureIncomingTransitions(Activity).
setNavigationalTransition in interface UniversiActivityContexttransition - The desired transition. May be null to clear the current one.UniversiActivityContext.getNavigationalTransition()@Nullable public universum.studios.android.transition.BaseNavigationalTransition getNavigationalTransition()
UniversiActivityContextgetNavigationalTransition in interface UniversiActivityContextnull if no transition has been specified.UniversiActivityContext.setNavigationalTransition(BaseNavigationalTransition)@NonNull public universum.studios.android.fragment.manage.FragmentController getFragmentController()
UniversiActivityContext
If not specified, instance of FragmentController is instantiated by default.
getFragmentController in interface UniversiActivityContextUniversiActivityContext.setFragmentController(FragmentController)public void setFragmentController(@Nullable
universum.studios.android.fragment.manage.FragmentController controller)
UniversiActivityContextsetFragmentController in interface UniversiActivityContextcontroller - The desired controller. May be null to use the default one.UniversiActivityContext.getFragmentController(),
UniversiActivityContext.setFragmentFactory(FragmentFactory)public void setFragmentFactory(@Nullable
universum.studios.android.fragment.manage.FragmentFactory factory)
UniversiActivityContextFragmentController of his activity.setFragmentFactory in interface UniversiActivityContextfactory - The desired factory. May be null to remove the current one.UniversiActivityContext.getFragmentFactory(),
UniversiActivityContext.setFragmentController(FragmentController),
UniversiActivityContext.getFragmentController()@Nullable public universum.studios.android.fragment.manage.FragmentFactory getFragmentFactory()
UniversiActivityContextgetFragmentFactory in interface UniversiActivityContextnull if no factory has been specified yet.UniversiActivityContext.setFragmentFactory(FragmentFactory)public void setDialogController(@Nullable
DialogController controller)
UniversiActivityContextsetDialogController in interface UniversiActivityContextcontroller - The desired controller. May be null to use the default one.UniversiActivityContext.getDialogController(),
UniversiActivityContext.setFragmentFactory(FragmentFactory)@NonNull public DialogController getDialogController()
UniversiActivityContext
If not specified, instance of DialogController is instantiated by default.
getDialogController in interface UniversiActivityContextUniversiActivityContext.setDialogController(DialogController)public void setDialogXmlFactory(@XmlRes
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(@Nullable
DialogFactory factory)
UniversiActivityContextDialogController of this activity.setDialogFactory in interface UniversiActivityContextfactory - The desired factory. May be null to remove the current one.UniversiActivityContext.getDialogFactory(),
UniversiActivityContext.showDialogWithId(int),
UniversiActivityContext.showDialogWithId(int, DialogOptions)@Nullable 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.
@UiThread 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 androidx.fragment.app.FragmentActivity@CheckResult public boolean isActiveNetworkConnected()
UniversiActivityContextisActiveNetworkConnected in interface UniversiActivityContextTrue if active network is connected, false otherwise.ConnectivityManager.getActiveNetworkInfo(),
NetworkInfo.isConnected(),
UniversiActivityContext.isNetworkConnected(int)@CheckResult 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(@NonNull
String permission)
checkSelfPermission in class android.content.ContextWrapperpublic boolean shouldShowRequestPermissionRationale(@NonNull
String permission)
shouldShowRequestPermissionRationale in class android.app.Activitypublic void supportRequestPermissions(@NonNull
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,
@NonNull
String[] permissions,
@NonNull
int[] grantResults)
onRequestPermissionsResult in interface androidx.core.app.ActivityCompat.OnRequestPermissionsResultCallbackonRequestPermissionsResult in class androidx.fragment.app.FragmentActivitypublic boolean showDialogWithId(int dialogId)
UniversiActivityContextUniversiActivityContext.showDialogWithId(int, DialogOptions) with null options.showDialogWithId in interface UniversiActivityContextpublic boolean showDialogWithId(int dialogId,
@Nullable
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),
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(@XmlRes
int resId)
UniversiActivityContextUniversiActivityContext.showXmlDialog(int, DialogOptions) with null options.showXmlDialog in interface UniversiActivityContextpublic boolean showXmlDialog(@XmlRes
int resId,
@Nullable
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(@XmlRes
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 androidx.fragment.app.FragmentActivityprotected 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 fragments via
dispatchBackPressToFragments() and if none of the currently visible fragments consumes
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()@Nullable protected androidx.fragment.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 onSaveInstanceState(@NonNull
android.os.Bundle state)
onSaveInstanceState in class androidx.appcompat.app.AppCompatActivitypublic void onSaveInstanceState(@NonNull
android.os.Bundle state,
@NonNull
android.os.PersistableBundle persistentState)
onSaveInstanceState in class android.app.Activityprotected void onPause()
onPause in class androidx.fragment.app.FragmentActivitypublic 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.protected void onDestroy()
onDestroy in class androidx.appcompat.app.AppCompatActivity