layout | title | permalink |
---|---|---|
page |
401.27 Reading Notes |
/401-R27/ |
-
A series of activities form a back stack based on the order in which activities were opened. The back stack is popped when Back is triggered on the system. Resuming an app will restore the existing back stack, while a freshly started or oldest activity in the stack will Back into the system Home screen.
-
the
onBackPressed()
method can be overridden to adjust behavior for background "warm" state instead of termination. -
The same activity may be present multiple times in the back stack for each instance if the app's structure allowed for this sequence.
- Multiple apps may be runnning in the background simultaneously. When in the background, the system selectively ends these background activities to free up memory.
-
The default activity behaviors may be altered or interrupted with attributes for the
<activity>
element as well as flags for an intent (when transitioning from one activity to another). -
New activities begin either from a defined manifest behavior (in the
launchMode
attribute) or thestartActivity()
method and the associatedIntent
(when the two interact, an intent superscedes a manifest)
- The methods
getSharedPreferences()
andgetPreferences()
are used for file access that is available across your app or for a particular activity, respectively.getPreferences()
does not require that a file name be specified.