Home | History | Annotate | Download | only in components
      1 page.title=Activity
      2 page.tags=Activity,
      3 @jd:body
      4 
      5 <div id="qv-wrapper">
      6 <div id="qv">
      7 <h2></h2>
      8 <ol>
      9   <li><a href="#Creating"> Activity</a>
     10     <ol>
     11       <li><a href="#UI"></a></li>
     12       <li><a href="#Declaring"> Activity</a></li>
     13     </ol>
     14   </li>
     15   <li><a href="#StartingAnActivity"> Activity</a>
     16     <ol>
     17       <li><a href="#StartingAnActivityForResult"> Activity </a></li>
     18     </ol>
     19   </li>
     20   <li><a href="#ShuttingDown"> Activity</a></li>
     21   <li><a href="#Lifecycle"> Activity </a>
     22     <ol>
     23       <li><a href="#ImplementingLifecycleCallbacks"></a></li>
     24       <li><a href="#SavingActivityState"> Activity </a></li>
     25       <li><a href="#ConfigurationChanges"></a></li>
     26       <li><a href="#CoordinatingActivities"> Activity</a></li>
     27     </ol>
     28   </li>
     29 </ol>
     30 
     31 <h2></h2>
     32 <ol>
     33   <li>{@link android.app.Activity}</li>
     34 </ol>
     35 
     36 <h2></h2>
     37 <ol>
     38   <li><a href="{@docRoot}guide/components/tasks-and-back-stack.html"></a>
     39 </li>
     40 </ol>
     41 
     42 </div>
     43 </div>
     44 
     45 
     46 
     47 <p>{@link android.app.Activity} 
     48 
     49  Activity 
     50 
     51 </p>
     52 
     53 <p>  Activity  Activity 
     54  Activity Activity Activity 
     55  Activity  Activity
     56  Activity  Activity  Activity ()
     57 
     58  Activity 
     59  Activity [] <em></em> Activity  () Activity
     60 
     61 (<a href="{@docRoot}guide/components/tasks-and-back-stack.html"></a>)
     62 
     63 </p>
     64 
     65 <p>Activity  Activity Activity  Activity  &mdash;  Activity  &mdash; Activity 
     66 
     67 
     68 
     69 
     70  Activity 
     71 Activity 
     72  Activity 
     73 </p>
     74 
     75 <p> Activity  Activity  Activity 
     76 
     77 </p>
     78 
     79 
     80 
     81 <h2 id="Creating"> Activity</h2>
     82 
     83 <p> Activity {@link android.app.Activity}  ()
     84  Activity Activity 
     85 
     86 
     87 </p>
     88 
     89 <dl>
     90   <dt>{@link android.app.Activity#onCreate onCreate()}</dt>
     91   <dd> Activity 
     92  Activity 
     93 
     94      {@link android.app.Activity#setContentView
     95  setContentView()} Activity </dd>
     96   <dt>{@link android.app.Activity#onPause onPause()}</dt>
     97   <dd> Activity  ( Activity )
     98  ()
     99 
    100 </dd>
    101 </dl>
    102 
    103 <p> Activity  Activity 
    104 
    105 <a href="#Lifecycle"> Activity </a>
    106 </p>
    107 
    108 
    109 
    110 <h3 id="UI"></h3>
    111 
    112 <p> Activity  &mdash;  {@link android.view.View} 
    113  Activity 
    114 
    115 </p>
    116 
    117 <p>Android 
    118 
    119  {@link
    120 android.view.ViewGroup} 
    121  {@link android.view.View} 
    122 {@link android.view.ViewGroup}  ()  Activity 
    123 </p>
    124 
    125 <p> XML  ()
    126  Activity 
    127  {@link android.app.Activity#setContentView(int) setContentView()}  ID Activity  UI
    128 
    129  {@link
    130 android.view.View}  {@link android.view.ViewGroup}
    131 {@link android.view.ViewGroup}  {@link android.app.Activity#setContentView(View)
    132 setContentView()}  Activity  {@link android.view.View}
    133 </p>
    134 
    135 <p><a href="{@docRoot}guide/topics/ui/index.html"></a></p>
    136 
    137 
    138 
    139 <h3 id="Declaring"> Activity</h3>
    140 
    141 <p> Activity
    142  Activity <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;}</a>  <a href="{@docRoot}guide/topics/manifest/application-element.html">{@code &lt;application&gt;}</a> 
    143 
    144 </p>
    145 
    146 <pre>
    147 &lt;manifest ... &gt;
    148   &lt;application ... &gt;
    149       &lt;activity android:name=".ExampleActivity" /&gt;
    150       ...
    151   &lt;/application ... &gt;
    152   ...
    153 &lt;/manifest &gt;
    154 </pre>
    155 
    156 <p> (attribute)  (property) Activity Activity  Activity UI <a href="{@docRoot}guide/topics/manifest/activity-element.html#nm">{@code android:name}</a>  (attribute)  &mdash;  Activity 
    157 
    158 
    159  (<a href="http://android-developers.blogspot.com/2011/06/things-that-cannot-change.html"></a>)
    160 
    161 
    162 </p>
    163 
    164 <p> <a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;}</a>  Activity
    165 </p>
    166 
    167 
    168 <h4></h4>
    169 
    170 <p><a href="{@docRoot}guide/topics/manifest/activity-element.html">{@code
    171 &lt;activity&gt;}</a>  &mdash;  <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
    172 &lt;intent-filter&gt;}</a>  &mdash; 
    173 </p>
    174 
    175 <p> Android SDK 
    176  Activity 
    177  Activity
    178 </p>
    179 
    180 <pre>
    181 &lt;activity android:name=".ExampleActivity" android:icon="@drawable/app_icon"&gt;
    182     &lt;intent-filter&gt;
    183         &lt;action android:name="android.intent.action.MAIN" /&gt;
    184         &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
    185     &lt;/intent-filter&gt;
    186 &lt;/activity&gt;
    187 </pre>
    188 
    189 <p><a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
    190 &lt;action&gt;}</a> <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
    191 &lt;category&gt;}</a>  Activity  ( Activity)
    192 </p>
    193 
    194 <p> Activity
    195  Activity 
    196  Activity ()
    197 
    198 </p>
    199 
    200 <p> Activity  ()  Activity 
    201 
    202  <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html">{@code
    203 &lt;intent-filter&gt;}</a>
    204 <a href="{@docRoot}guide/topics/manifest/action-element.html">{@code
    205 &lt;action&gt;}</a>  <a href="{@docRoot}guide/topics/manifest/category-element.html">{@code
    206 &lt;category&gt;}</a>  () / <a href="{@docRoot}guide/topics/manifest/data-element.html">{@code
    207 &lt;data&gt;}</a>  Activity 
    208 </p>
    209 
    210 <p> Activity <a href="{@docRoot}guide/components/intents-filters.html"></a>
    211 </p>
    212 
    213 
    214 
    215 <h2 id="StartingAnActivity"> Activity</h2>
    216 
    217 <p> {@link android.app.Activity#startActivity
    218  startActivity()} {@link android.content.Intent} ( Activity)  Activity
    219  Activity ( Activity Activity)
    220 
    221 
    222  Activity 
    223 </p>
    224 
    225 <p> Activity
    226   Activity ()
    227  Activity  {@code
    228 SignInActivity}  Activity</p>
    229 
    230 <pre>
    231 Intent intent = new Intent(this, SignInActivity.class);
    232 startActivity(intent);
    233 </pre>
    234 
    235 <p> Activity 
    236  Activity  Activity Activity 
    237 
    238  &mdash;  Activity
    239 
    240 
    241  Activity  Activity
    242 
    243 
    244 </p>
    245 
    246 <pre>
    247 Intent intent = new Intent(Intent.ACTION_SEND);
    248 intent.putExtra(Intent.EXTRA_EMAIL, recipientArray);
    249 startActivity(intent);
    250 </pre>
    251 
    252 <p> {@link android.content.Intent#EXTRA_EMAIL} 
    253 
    254 
    255  Activity  Activity
    256 </p>
    257 
    258 
    259 
    260 
    261 <h3 id="StartingAnActivityForResult"> Activity </h3>
    262 
    263 <p> Activity  {@link android.app.Activity#startActivityForResult
    264  startActivityForResult()} ( {@link android.app.Activity#startActivity
    265  startActivity()})  Activity
    266  Activity  {@link android.app.Activity#onActivityResult onActivityResult()} 
    267 
    268  Activity  {@link
    269 android.content.Intent}  {@link android.app.Activity#onActivityResult onActivityResult()} 
    270 </p>
    271 
    272 <p> Activity 
    273 
    274 </p>
    275 
    276 <pre>
    277 private void pickContact() {
    278     // Create an intent to "pick" a contact, as defined by the content provider URI
    279     Intent intent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI);
    280     startActivityForResult(intent, PICK_CONTACT_REQUEST);
    281 }
    282 
    283 &#64;Override
    284 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    285     // If the request went well (OK) and the request was PICK_CONTACT_REQUEST
    286     if (resultCode == Activity.RESULT_OK &amp;&amp; requestCode == PICK_CONTACT_REQUEST) {
    287         // Perform a query to the contact's content provider for the contact's name
    288         Cursor cursor = getContentResolver().query(data.getData(),
    289         new String[] {Contacts.DISPLAY_NAME}, null, null, null);
    290         if (cursor.moveToFirst()) { // True if the cursor is not empty
    291             int columnIndex = cursor.getColumnIndex(Contacts.DISPLAY_NAME);
    292             String name = cursor.getString(columnIndex);
    293             // Do something with the selected contact's name...
    294         }
    295     }
    296 }
    297 </pre>
    298 
    299 <p> {@link
    300 android.app.Activity#onActivityResult onActivityResult()}  Activity 
    301  &mdash; {@code resultCode}  {@link android.app.Activity#RESULT_OK} &mdash; &mdash;  {@code requestCode}  {@link android.app.Activity#startActivityForResult
    302 startActivityForResult()} 
    303 
    304 
    305  {@link android.content.Intent} ({@code data} )  Activity 
    306 </p>
    307 
    308 <p>{@link
    309 android.content.ContentResolver} 
    310 {@link android.database.Cursor} <a href="{@docRoot}guide/topics/providers/content-providers.html"></a>
    311 </p>
    312 
    313 <p><a href="{@docRoot}guide/components/intents-filters.html"></a>
    314 </p>
    315 
    316 
    317 <h2 id="ShuttingDown"> Activity</h2>
    318 
    319 <p> Activity  {@link android.app.Activity#finish
    320 finish()}  Activity
    321 {@link android.app.Activity#finishActivity finishActivity()} Activity</p>
    322 
    323 <p class="note"><strong></strong> Activity
    324  Activity Android  Activity  Activity
    325 
    326  Activity 
    327 
    328 </p>
    329 
    330 
    331 <h2 id="Lifecycle"> Activity </h2>
    332 
    333 <p> Activity 
    334 
    335 Activity  Activity
    336 </p>
    337 
    338 <p>Activity </p>
    339 
    340 <dl>
    341   <dt><i></i></dt>
    342     <dd>Activity  ()
    343 </dd>
    344 
    345   <dt><i></i></dt>
    346     <dd> Activity Activity Activity  Activity 
    347 
    348  Activity  ({@link android.app.Activity} )
    349 
    350 </dd>
    351 
    352   <dt><i></i></dt>
    353     <dd> Activity  Activity ( Activity )
    354  Activity  ({@link android.app.Activity} <em></em>)
    355 
    356  Activity
    357 </dd>
    358 </dl>
    359 
    360 <p> Activity  ( {@link android.app.Activity#finish finish()} ) 
    361 
    362 Activity 
    363 </p>
    364 
    365 
    366 
    367 <h3 id="ImplementingLifecycleCallbacks"></h3>
    368 
    369 <p>Activity  ()
    370  Activity 
    371  Activity 
    372 </p>
    373 
    374 
    375 <pre>
    376 public class ExampleActivity extends Activity {
    377     &#64;Override
    378     public void {@link android.app.Activity#onCreate onCreate}(Bundle savedInstanceState) {
    379         super.onCreate(savedInstanceState);
    380         // The activity is being created.
    381     }
    382     &#64;Override
    383     protected void {@link android.app.Activity#onStart onStart()} {
    384         super.onStart();
    385         // The activity is about to become visible.
    386     }
    387     &#64;Override
    388     protected void {@link android.app.Activity#onResume onResume()} {
    389         super.onResume();
    390         // The activity has become visible (it is now "resumed").
    391     }
    392     &#64;Override
    393     protected void {@link android.app.Activity#onPause onPause()} {
    394         super.onPause();
    395         // Another activity is taking focus (this activity is about to be "paused").
    396     }
    397     &#64;Override
    398     protected void {@link android.app.Activity#onStop onStop()} {
    399         super.onStop();
    400         // The activity is no longer visible (it is now "stopped")
    401     }
    402     &#64;Override
    403     protected void {@link android.app.Activity#onDestroy onDestroy()} {
    404         super.onDestroy();
    405         // The activity is about to be destroyed.
    406     }
    407 }
    408 </pre>
    409 
    410 <p class="note"><strong></strong>
    411 </p>
    412 
    413 <p> Activity  Activity 
    414  </p>
    415 
    416 <ul>
    417 <li>Activity <b></b> {@link
    418 android.app.Activity#onCreate onCreate()}  {@link
    419 android.app.Activity#onDestroy}  Activity  {@link android.app.Activity#onCreate onCreate()}  () {@link android.app.Activity#onDestroy} 
    420 
    421  Activity  {@link android.app.Activity#onCreate onCreate()}  {@link
    422 android.app.Activity#onDestroy} 
    423 
    424 </li>
    425 
    426 <li><p>Activity <b></b> {@link
    427 android.app.Activity#onStart onStart()}  {@link
    428 android.app.Activity#onStop onStop()}  Activity
    429  Activity Activity  {@link android.app.Activity#onStop onStop()}
    430 
    431 {@link
    432 android.app.Activity#onStart onStart()} 
    433 {@link android.content.BroadcastReceiver} UI  {@link android.app.Activity#onStop onStop()} 
    434 
    435  Activity  {@link android.app.Activity#onStart onStart()}  {@link
    436 android.app.Activity#onStop onStop()} Activity 
    437 </p></li>
    438 
    439 <li><p>Activity <b></b> {@link
    440 android.app.Activity#onResume onResume()}  {@link android.app.Activity#onPause
    441 onPause()} Activity  Activity 
    442 Activity  &mdash;  {@link android.app.Activity#onPause onPause()}
    443 
    444 
    445 </p></li>
    446 </ul>
    447 
    448 <p> 1  Activity  Activity 
    449 
    450  <p>
    451 
    452 <img src="{@docRoot}images/activity_lifecycle.png" alt="" />
    453 <p class="img-caption"><strong> 1.</strong>Activity </p>
    454 
    455 <p> 1  Activity  Activity
    456 
    457 
    458 </p>
    459 
    460 <p class="table-caption"><strong> 1.</strong>Activity 
    461 </p>
    462 
    463 <table border="2" width="85%" frame="hsides" rules="rows">
    464 <colgroup align="left" span="3"></colgroup>
    465 <colgroup align="left"></colgroup>
    466 <colgroup align="center"></colgroup>
    467 <colgroup align="center"></colgroup>
    468 
    469 <thead>
    470 <tr><th colspan="3"></th> <th></th> <th></th> <th></th></tr>
    471 </thead>
    472 
    473 <tbody>
    474 <tr>
    475   <td colspan="3" align="left"><code>{@link android.app.Activity#onCreate onCreate()}</code></td>
    476   <td> Activity 
    477        &mdash; 
    478  Activity  (<a href="#actstate"> Activity </a>)
    479 
    480 
    481 
    482       <p> {@code onStart()}</p></td>
    483   <td align="center"></td>
    484       <td align="center">{@code onStart()}</td>
    485 </tr>
    486 
    487 <tr>
    488    <td rowspan="5" style="border-left: none; border-right: none;">&nbsp;&nbsp;&nbsp;&nbsp;</td>
    489    <td colspan="2" align="left"><code>{@link android.app.Activity#onRestart
    490 onRestart()}</code></td>
    491    <td>Activity 
    492 
    493        <p> {@code onStart()}</p></td>
    494    <td align="center"></td>
    495    <td align="center">{@code onStart()}</td>
    496 </tr>
    497 
    498 <tr>
    499    <td colspan="2" align="left"><code>{@link android.app.Activity#onStart onStart()}</code></td>
    500    <td>Activity 
    501        <p> Activity  {@code onResume()} {@code onStop()}
    502 </p></td>
    503     <td align="center"></td>
    504     <td align="center">{@code onResume()} <br/><br/> {@code onStop()}</td>
    505 </tr>
    506 
    507 <tr>
    508    <td rowspan="2" style="border-left: none;">&nbsp;&nbsp;&nbsp;&nbsp;</td>
    509    <td align="left"><code>{@link android.app.Activity#onResume onResume()}</code></td>
    510    <td>Activity 
    511 Activity  Activity 
    512 
    513        <p> {@code onPause()}</p></td>
    514    <td align="center"></td>
    515    <td align="center">{@code onPause()}</td>
    516 </tr>
    517 
    518 <tr>
    519    <td align="left"><code>{@link android.app.Activity#onPause onPause()}</code></td>
    520    <td> Activity 
    521  CPU 
    522 
    523  Activity
    524 
    525        <p> Activity  {@code onResume()} {@code onStop()}
    526 
    527 </td>
    528    <td align="center"><strong style="color:#800000"></strong></td>
    529    <td align="center">{@code onResume()} <br/><br/> {@code onStop()}</td>
    530 </tr>
    531 
    532 <tr>
    533    <td colspan="2" align="left"><code>{@link android.app.Activity#onStop onStop()}</code></td>
    534    <td> Activity Activity  Activity ( Activity  Activity) 
    535 
    536 
    537        <p> Activity  {@code onRestart()} Activity 
    538  {@code onDestroy()}
    539 </p></td>
    540    <td align="center"><strong style="color:#800000"></strong></td>
    541    <td align="center">{@code onRestart()} <br/><br/> {@code onDestroy()}</td>
    542 </tr>
    543 
    544 <tr>
    545    <td colspan="3" align="left"><code>{@link android.app.Activity#onDestroy
    546 onDestroy()}</code></td>
    547    <td> Activity Activity 
    548 Activity  ( Activity  <code>{@link android.app.Activity#finish
    549        finish()}</code>) Activity 
    550 
    551  <code>{@link
    552        android.app.Activity#isFinishing isFinishing()}</code> 
    553 </td>
    554    <td align="center"><strong style="color:#800000"></strong></td>
    555    <td align="center"><em></em></td>
    556 </tr>
    557 </tbody>
    558 </table>
    559 
    560 <p> Activity <em></em> Activity 
    561 
    562 ({@link
    563 android.app.Activity#onPause
    564 onPause()}{@link android.app.Activity#onStop onStop()}  {@link android.app.Activity#onDestroy
    565 onDestroy()}) {@link android.app.Activity#onPause onPause()} Activity {@link android.app.Activity#onPause onPause()} <em></em> &mdash;  {@link
    566 android.app.Activity#onStop onStop()}  {@link android.app.Activity#onDestroy onDestroy()}
    567 
    568 
    569 
    570  {@link android.app.Activity#onPause onPause()}  () 
    571  {@link android.app.Activity#onPause onPause()}  Activity
    572 
    573 
    574 </p>
    575 
    576 <p> <b></b> Activity 
    577 Activity  {@link android.app.Activity#onPause onPause()} 
    578  {@link android.app.Activity#onResume onResume()} 
    579 
    580 {@link android.app.Activity#onPause onPause()} Activity  </p>
    581 
    582 <p class="note"><strong></strong> 1  Activity  &mdash; 
    583 
    584 Activity <a href="{@docRoot}guide/components/processes-and-threads.html"></a>
    585 
    586 </p>
    587 
    588 
    589 <h3 id="SavingActivityState"> Activity </h3>
    590 
    591 <p><a href="#Lifecycle"> Activity </a> Activity  Activity 
    592 
    593  {@link android.app.Activity}  &mdash; 
    594 
    595  Activity  Activity  ()
    596 
    597 </p>
    598 
    599 <p> Activity {@link
    600 android.app.Activity} 
    601  {@link android.app.Activity} 
    602  Activity  Activity 
    603 
    604  Activity  Activity {@link
    605 android.app.Activity#onSaveInstanceState onSaveInstanceState()}
    606 
    607 </p>
    608 
    609 <p> Activity  {@link android.app.Activity#onSaveInstanceState onSaveInstanceState()}
    610  {@link android.os.Bundle}  {@link
    611 android.os.Bundle#putString putString()}  {@link
    612 android.os.Bundle#putInt putInt()}  Activity -
    613 
    614  Activity Activity {@link android.os.Bundle}  {@link android.app.Activity#onCreate onCreate()}  {@link
    615 android.app.Activity#onRestoreInstanceState onRestoreInstanceState()}
    616 
    617  {@link android.os.Bundle}  Activity 
    618 
    619  {@link
    620 android.os.Bundle}  (null) ( Activity )
    621 </p>
    622 
    623 <img src="{@docRoot}images/fundamentals/restore_instance.png" alt="" />
    624 <p class="img-caption"><strong> 2.</strong>Activity Activity Activity Activity Activity 
    625 
    626 
    627 </p>
    628 
    629 <p class="note"><strong></strong> Activity  {@link
    630 android.app.Activity#onSaveInstanceState onSaveInstanceState()} ( Activity <em></em> Activity)
    631 
    632 
    633 
    634  {@link android.app.Activity#onSaveInstanceState
    635 onSaveInstanceState()} {@link
    636 android.app.Activity#onStop onStop()}  {@link android.app.Activity#onPause
    637 onPause()} </p>
    638 
    639 <p> {@link
    640 android.app.Activity#onSaveInstanceState onSaveInstanceState()} Activity {@link android.app.Activity}  {@link
    641 android.app.Activity#onSaveInstanceState onSaveInstanceState()} 
    642  {@link
    643 android.view.View}  {@link
    644 android.view.View#onSaveInstanceState onSaveInstanceState()} 
    645 
    646  Android  UI  Activity 
    647 
    648 {@link android.widget.EditText}  {@link android.widget.CheckBox} 
    649 
    650  ID ( <a href="{@docRoot}guide/topics/resources/layout-resource.html#idvalue">{@code android:id}</a> ) 
    651  ID
    652 </p>
    653 
    654 <div class="sidebox-wrapper">
    655 <div class="sidebox">
    656 <p>
    657 {@link android.R.attr#saveEnabled android:saveEnabled}  {@code "false"} {@link android.view.View#setSaveEnabled setSaveEnabled()} 
    658  Activity UI 
    659 </p>
    660 </div>
    661 </div>
    662 
    663 <p> {@link
    664 android.app.Activity#onSaveInstanceState onSaveInstanceState()}  Activity UI  Activity  ( UI  UI )
    665 
    666 
    667 
    668 </p>
    669 
    670 <p> {@link
    671 android.app.Activity#onSaveInstanceState onSaveInstanceState()}  UI  {@link android.app.Activity#onSaveInstanceState onSaveInstanceState()} 
    672 
    673 
    674  {@link
    675 android.app.Activity#onRestoreInstanceState onRestoreInstanceState()}  ()
    676 </p>
    677 
    678 <p class="note"><strong></strong> {@link android.app.Activity#onSaveInstanceState
    679 onSaveInstanceState()} Activity  (UI ) &mdash; 
    680 
    681  Activity  {@link
    682 android.app.Activity#onPause onPause()}  ()
    683 </p>
    684 
    685 <p>
    686  Activity 
    687 
    688  Activity 
    689 
    690 </p>
    691 
    692 
    693 <h3 id="ConfigurationChanges"></h3>
    694 
    695 <p> ()
    696 Android  Activity ( {@link android.app.Activity#onDestroy} {@link
    697 android.app.Activity#onCreate onCreate()})
    698  ()
    699 
    700 
    701 </p>
    702 
    703 <p> Activity Activity  Activity 
    704 
    705 </p>
    706 
    707 <p> {@link
    708 android.app.Activity#onSaveInstanceState onSaveInstanceState()}  {@link
    709 android.app.Activity#onRestoreInstanceState onRestoreInstanceState()} ( {@link
    710 android.app.Activity#onCreate onCreate()})  Activity 
    711 </p>
    712 
    713 <p><a href="{@docRoot}guide/topics/resources/runtime-changes.html"></a>
    714 
    715 </p>
    716 
    717 
    718 
    719 <h3 id="CoordinatingActivities"> Activity</h3>
    720 
    721  <p>Activity  Activity  Activity  () Activity 
    722 
    723  Activity  Activity  Activity  Activity  Activity 
    724 
    725 
    726 </p>
    727 
    728 <p> Activity  Activity  Activity 
    729 Activity A  Activity B 
    730  </p>
    731 
    732 <ol>
    733 <li>Activity A  {@link android.app.Activity#onPause onPause()} </li>
    734 
    735 <li>Activity B  {@link android.app.Activity#onCreate onCreate()}{@link
    736 android.app.Activity#onStart onStart()}  {@link android.app.Activity#onResume onResume()} 
    737 (Activity B )</li>
    738 
    739 <li> Activity A Activity A  {@link
    740 android.app.Activity#onStop onStop()} </li>
    741 </ol>
    742 
    743  <p> Activity 
    744  Activity  Activity  {@link android.app.Activity#onPause onPause()}  {@link
    745 android.app.Activity#onStop onStop()} 
    746 
    747 </p>
    748 
    749 <!--
    750 <h2>Beginner's Path</h2>
    751 
    752 <p>For more information about how Android maintains a history of activities and
    753 enables user multitasking, continue with the <b><a
    754 href="{@docRoot}guide/components/tasks-and-back-stack.html">Tasks and Back
    755 Stack</a></b> document.</p>
    756 -->
    757