Class ActivityEP
The specifications are read and handled by AndroidEntryPointLocator.
- Author:
- Tobias Blaschke <code@tobiasblaschke.de>
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AndroidEntryPointLocator.AndroidPossibleEntryPoint
You can override this to intercept all generic motion events before they are dispatched to the window.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
You can override this to intercept all key events before they are dispatched to the window.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Accessibility events that are sent by the system when something notable happens in the user interface.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Menus may depend on it..static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when an Activity started by this one returns its result.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called by setTheme(int) and getTheme() to apply a theme resource to the current Theme object.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when the main window associated with the activity has been attached to the window manager.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when a Fragment is being attached to this activity, immediately after the call to its Fragment.onAttach() method and before Fragment.onCreate().static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Will be called if you have selected configurations you would like to handle with the configChanges attribute in your manifest.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This hook is called whenever the content view of the screen changes.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO: How does this correlate to onMenuItemSelected.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This hook is called whenever the context menu is being closed.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called after App.onCreate - assumed to be before Service.onCreate.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when a context menu for the view is about to be shown.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This method is called before pausingstatic final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Callback for creating dialogs that are managed (saved and restored) for you by the activity.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This method will be invoked by the default implementation of onNavigateUp()static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO: GET MORE INFO ON THIS!.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO: GET MORE INFO ON THIS!.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This method is called before pausingstatic final AndroidEntryPointLocator.AndroidPossibleEntryPoint
used when inflating with the LayoutInflater returned by getSystemService(String).static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Perform any final cleanup before an activity is destroyed.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when the main window associated with the activity has been detached from the window manager.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when a generic motion event was not handled by any of the views inside of the activity.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
The default implementation takes care of KEYCODE_BACK by calling onBackPressed(), though the behavior varies based on the application compatibility mode: for ECLAIR or later applications, it will set up the dispatch to call onKeyUp(int, KeyEvent) where the action will be performed; for earlier applications, it will perform the action immediately in on-down, as those versions of the platform behaved.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
The default implementation handles KEYCODE_BACK to stop the activity and go back.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
While the exact point at which this will be called is not defined, generally it will happen when all background process have been killed.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO More info.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO: More Infostatic final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This method is called whenever the user chooses to navigate Up within your application's activity hierarchy from the action bar.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This is called when a child activity of this one attempts to navigate up.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Activity is re-launched while at the top of the activity stack instead of a new instance of the activity being started.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO: GET MORE INFO ON THIS!.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Activity is going to the background.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when activity start-up is complete.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when activity resume is complete.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Provides an opportunity to prepare a managed dialog before it is being shown.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Prepare the synthetic task stack that will be generated during Up navigation from a different task.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
TODO: GET MORE INFO ON THIS!.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This function will be called after any global assist callbacks.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Current activity is being re-displayed to the user.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Restores the View-State (and may do other stuff).static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Activity starts interacting with the user.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called by the system, as part of destroying an activity due to a configuration change, when it is known that a new instance will immediately be created for the new configuration.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called to retrieve per-instance state from an activity before being killed.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This hook is called when the user signals the desire to start a search.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called a view steps before the Activity gets visible.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when you are no longer visible to the user.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when a touch screen event was not handled by any of the views under it.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when the trackball was moved and not handled by any of the views inside of the activity.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This will happen for example when it goes in the background and there is not enough memory to keep as many background processes running as desired.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called whenever a key, touch, or trackball event is dispatched to the activity.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called as part of the activity lifecycle when an activity is about to go into the background as the result of user choice.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
This is called whenever the current window attributes change.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Called when the current Window of the activity gains or loses focus.static final AndroidEntryPointLocator.AndroidPossibleEntryPoint
Give the Activity a chance to control the UI for an action mode requested by the system. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
populate
(List<? super AndroidEntryPointLocator.AndroidPossibleEntryPoint> possibleEntryPoints) Add the EntryPoint specifications defined in this file to the given list.
-
Field Details
-
onCreate
Called after App.onCreate - assumed to be before Service.onCreate.This does not have to be called before Service.onCreate but the user assumably starts most apps with an activity we place it slightly before the Services
-
onStart
Called a view steps before the Activity gets visible.Called after onCreate(Bundle) — or after onRestart() when the activity had been stopped, but is now again being displayed to the user. It will be followed by onResume().
-
onRestoreInstanceState
Restores the View-State (and may do other stuff).This method is called after onStart() when the activity is being re-initialized from a previously saved state, given here in savedInstanceState.
The default implementation of this method performs a restore of any view state that had previously been frozen by onSaveInstanceState(Bundle).
This method is called between onStart() and onPostCreate(Bundle).
-
onPostCreate
Called when activity start-up is complete.Called after onStart() and onRestoreInstanceState(Bundle)
-
onResume
Activity starts interacting with the user.Called after onRestoreInstanceState(Bundle), onRestart(), or onPause() Use onWindowFocusChanged(boolean) to know for certain that your activity is visible to the user.
-
onPostResume
Called when activity resume is complete. -
onNewIntent
Activity is re-launched while at the top of the activity stack instead of a new instance of the activity being started. onNewIntent() will be called on the existing instance with the Intent that was used to re-launch it.An activity will always be paused before receiving a new intent, so you can count on onResume() being called after this method.
-
onStop
Called when you are no longer visible to the user.Next call will be either onRestart(), onDestroy(), or nothing, depending on later user activity.
-
onRestart
Current activity is being re-displayed to the user.Called after onStop(), followed by onStart() and then onResume().
-
onSaveInstanceState
Called to retrieve per-instance state from an activity before being killed.It will get restored by onCreate(Bundle) or onRestoreInstanceState(Bundle).
If called, this method will occur before onStop(). There are no guarantees about whether it will occur before or after onPause().
-
onPause
Activity is going to the background.Activity has not (yet) been killed. The counterpart to onResume().
In situations where the system needs more memory it may kill paused processes to reclaim resources. In general onSaveInstanceState(Bundle) is used to save per-instance state in the activity and this method is used to store global persistent data (in content providers, files, etc.)
After receiving this call you will usually receive a following call to onStop() however in some cases there will be a direct call back to onResume() without going through the stopped state.
-
onDestroy
Perform any final cleanup before an activity is destroyed.Someone called finish() on the Activity, or the system is temporarily destroying this Activity to save space. There are situations where the system will simply kill the activity's hosting process without calling this method.
-
onActivityResult
Called when an Activity started by this one returns its result. -
dispatchPopulateAccessibilityEvent
public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchPopulateAccessibilityEventAccessibility events that are sent by the system when something notable happens in the user interface. For example, when a Button is clicked, a View is focused, etc.TODO: Assert included everywhere
-
onCreateDialog
Callback for creating dialogs that are managed (saved and restored) for you by the activity.If you would like an opportunity to prepare your dialog before it is shown, override onPrepareDialog.
This method was deprecated in API level 13.
-
onPrepareDialog
Provides an opportunity to prepare a managed dialog before it is being shown.This method was deprecated in API level 13.
-
onCreateView
used when inflating with the LayoutInflater returned by getSystemService(String).TODO: More info This implementation handles tags to embed fragments inside of the activity.
-
onAttachFragment
Called when a Fragment is being attached to this activity, immediately after the call to its Fragment.onAttach() method and before Fragment.onCreate(). -
onAttachedToWindow
Called when the main window associated with the activity has been attached to the window manager. See View.onAttachedToWindow() for more information. # TODO: SeeNote that this function is guaranteed to be called before View.onDraw including before or after onMeasure(int, int).
-
onDetachedFromWindow
Called when the main window associated with the activity has been detached from the window manager. See View.onDetachedFromWindow() for more information. # TODO See -
onContentChanged
This hook is called whenever the content view of the screen changes.Due to a call to Window.setContentView or Window.addContentView
-
onApplyThemeResource
Called by setTheme(int) and getTheme() to apply a theme resource to the current Theme object.TODO: Do we have to register an entrypoint for this?
-
onCreatePanelView
TODO: GET MORE INFO ON THIS!.This simply returns null so that all panel sub-windows will have the default menu behavior.
-
onCreatePanelMenu
TODO: GET MORE INFO ON THIS!.This calls through to the new onCreateOptionsMenu(Menu) method for the FEATURE_OPTIONS_PANEL panel
-
onPreparePanel
TODO: GET MORE INFO ON THIS!.This calls through to the new onPrepareOptionsMenu(Menu) method for the FEATURE_OPTIONS_PANEL
-
onPanelClosed
TODO: GET MORE INFO ON THIS!.This calls through to onOptionsMenuClosed(Menu) method for the FEATURE_OPTIONS_PANEL. For context menus (FEATURE_CONTEXT_MENU), the onContextMenuClosed(Menu) will be called.
-
onCreateContextMenu
Called when a context menu for the view is about to be shown.Unlike onCreateOptionsMenu(Menu), this will be called every time the context menu is about to be shown.
Use onContextItemSelected(android.view.MenuItem) to know when an item has been selected.
-
onContextItemSelected
TODO: How does this correlate to onMenuItemSelected.You can use this method for any items for which you would like to do processing without those other facilities.
-
onContextMenuClosed
This hook is called whenever the context menu is being closed.either by the user canceling the menu with the back/menu button, or when an item is selected.
-
onCreateOptionsMenu
-
onOptionsItemSelected
-
onPrepareOptionsMenu
-
onOptionsMenuClosed
-
onMenuOpened
TODO: More Info -
onMenuItemSelected
TODO More info.This calls through to the new onOptionsItemSelected(MenuItem)
-
onTitleChanged
-
onChildTitleChanged
-
onUserInteraction
Called whenever a key, touch, or trackball event is dispatched to the activity.This callback and onUserLeaveHint() are intended to help activities manage status bar notifications intelligently; specifically, for helping activities determine the proper time to cancel a notification.
All calls to your activity's onUserLeaveHint() callback will be accompanied by calls to onUserInteraction().
Note that this callback will be invoked for the touch down action that begins a touch gesture, but may not be invoked for the touch-moved and touch-up actions that follow.
-
dispatchTouchEvent
-
onTouchEvent
Called when a touch screen event was not handled by any of the views under it.This is most useful to process touch events that happen outside of your window bounds, where there is no view to receive it.
-
dispatchGenericMotionEvent
You can override this to intercept all generic motion events before they are dispatched to the window.TODO: Verify before on... stuff
-
onGenericMotionEvent
Called when a generic motion event was not handled by any of the views inside of the activity.Generic motion events with source class SOURCE_CLASS_POINTER are delivered to the view under the pointer. All other generic motion events are delivered to the focused view.
TODO: After onUserInteraction?
-
dispatchTrackballEvent
-
onTrackballEvent
Called when the trackball was moved and not handled by any of the views inside of the activity.The call here happens before trackball movements are converted to DPAD key events, which then get sent back to the view hierarchy, and will be processed at the point for things like focus navigation.
-
dispatchKeyEvent
You can override this to intercept all key events before they are dispatched to the window. TODO: Verify before on... stuff -
dispatchKeyShortcutEvent
-
onKeyDown
The default implementation takes care of KEYCODE_BACK by calling onBackPressed(), though the behavior varies based on the application compatibility mode: for ECLAIR or later applications, it will set up the dispatch to call onKeyUp(int, KeyEvent) where the action will be performed; for earlier applications, it will perform the action immediately in on-down, as those versions of the platform behaved.TODO: After onUserInteraction?
-
onKeyLongPress
-
onKeyMultiple
-
onKeyShortcut
-
onKeyUp
The default implementation handles KEYCODE_BACK to stop the activity and go back. -
onBackPressed
-
onSearchRequested
This hook is called when the user signals the desire to start a search...in response to a menu item, search button, or other widgets within your activity.
-
onActionModeStarted
Menus may depend on it.. -
onActionModeFinished
-
onWindowStartingActionMode
Give the Activity a chance to control the UI for an action mode requested by the system. -
onConfigurationChanged
Will be called if you have selected configurations you would like to handle with the configChanges attribute in your manifest. If any configuration change occurs that is not selected to be reported by that attribute, then instead of reporting it the system will stop and restart the activity -
onCreateDescription
This method is called before pausing -
onCreateThumbnail
This method is called before pausing -
onProvideAssistData
This function will be called after any global assist callbacks.Assit is requested by the user. TODO: WTF is this?
-
onRetainNonConfigurationInstance
public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onRetainNonConfigurationInstanceCalled by the system, as part of destroying an activity due to a configuration change, when it is known that a new instance will immediately be created for the new configuration.The function will be called between onStop() and onDestroy(). A new instance of the activity will always be immediately created after this one's onDestroy() is called.
-
onLowMemory
While the exact point at which this will be called is not defined, generally it will happen when all background process have been killed. That is, before reaching the point of killing processes hosting service and foreground UI that we would like to avoid killing. -
onTrimMemory
This will happen for example when it goes in the background and there is not enough memory to keep as many background processes running as desired. -
onUserLeaveHint
Called as part of the activity lifecycle when an activity is about to go into the background as the result of user choice. For example, when the user presses the Home key.this method is called right before the activity's onPause() callback.
-
onWindowAttributesChanged
This is called whenever the current window attributes change. -
onWindowFocusChanged
Called when the current Window of the activity gains or loses focus.Note that this provides information about global focus state, which is managed independently of activity lifecycles. As such, while focus changes will generally have some relation to lifecycle changes, you should not rely on any particular order between the callbacks here and those in the other lifecycle methods such as onResume().
-
-
Constructor Details
-
ActivityEP
public ActivityEP()
-
-
Method Details
-
populate
public static void populate(List<? super AndroidEntryPointLocator.AndroidPossibleEntryPoint> possibleEntryPoints) Add the EntryPoint specifications defined in this file to the given list.- Parameters:
possibleEntryPoints
- the list to extend.
-