Home | History | Annotate | Download | only in topics
      1 <?xml version="1.0" encoding="utf-8"?>
      2 <!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "../dtd/reference.dtd">
      3 <reference id="u_new-activity" xml:lang="en-us">
      4   <title>New Activity wizard</title>
      5   <shortdesc>Creates a new Android activity.</shortdesc>
      6   <prolog>
      7     <metadata>
      8       <keywords>
      9         <!--<indexterm></indexterm>-->
     10       </keywords>
     11     </metadata>
     12   </prolog>
     13   <refbody>
     14     <section>
     15       <p>Use this dialog if you just want a basic activity as your starting point (this basic activity consists of
     16         little more than an empty onCreate() method; you can also have an empty onStart() method added by selecting it
     17         from the list at the bottom of the dialog). If you would like the activity to be created based upon a sample,
     18         select <uicontrol>Create New Activity Based On Template</uicontrol>. </p>
     19       <simpletable>
     20         <strow>
     21           <stentry><uicontrol>Source folder</uicontrol></stentry>
     22           <stentry>The folder into which the source code for the new activity is to be stored. By default this is the
     23             current project's src folder.</stentry>
     24         </strow>
     25         <strow>
     26           <stentry><uicontrol>Package</uicontrol></stentry>
     27           <stentry>The package that is to contain the new activity. By default this is the current project's
     28           package.</stentry>
     29         </strow>
     30         <strow>
     31           <stentry><uicontrol>Name</uicontrol></stentry>
     32           <stentry>The name to be used for the class that implements the activity. This should be a simple,
     33             non-qualified name.</stentry>
     34         </strow>
     35         <strow>
     36           <stentry><uicontrol>Label</uicontrol></stentry>
     37           <stentry>(optional) The label for the activity. This label is displayed to the user, often along with the
     38             activity's icon, when the activity needs to be identified to the user. Note that if you specify a label, the
     39             New Activity wizard creates a string resource to hold this value. If the <uicontrol>Default</uicontrol>
     40             option is selected, a label is not set for this activity (the Label field is not editable); the user sees
     41             the application's label instead.</stentry>
     42         </strow>
     43         <strow>
     44           <stentry><uicontrol>Superclass</uicontrol></stentry>
     45           <stentry>The class from which the activity inherits. For activities, this is <codeph
     46             >android.app.Activity</codeph>.</stentry>
     47         </strow>
     48         <strow>
     49           <stentry><uicontrol>Permission</uicontrol></stentry>
     50           <stentry>(optional) Permissions that should be added to the project's manifest file due to this activity.
     51             Click <uicontrol>Add</uicontrol> to display a list of possible permissions from which you can
     52           select.</stentry>
     53         </strow>
     54         <strow>
     55           <stentry><uicontrol>Action</uicontrol></stentry>
     56           <stentry>(optional) The actions to be performed by an intent filter associated with this activity. Click
     57               <uicontrol>Add</uicontrol> to select from the available actions. Note that you can select multiple intents
     58             from the dialog that appears when you click <uicontrol>Add</uicontrol>. To select a range, select the first
     59             item in the set and then hold down the Shift key while selecting the last item in the set. To select
     60             multiple separate intents, select the first item and then hold down the Control key while selecting the
     61             remaining items.</stentry>
     62         </strow>
     63         <strow>
     64           <stentry><uicontrol>Category</uicontrol></stentry>
     65           <stentry>(optional) The associated intent filter categories. Click <uicontrol>Add</uicontrol> to select from
     66             the available categories.</stentry>
     67         </strow>
     68         <strow>
     69           <stentry><uicontrol>Set as the main activity</uicontrol></stentry>
     70           <stentry>Select this option if this new activity is to be the app's main activity. Doing so updates the
     71             application's manifest file to specify that this is the activity that should be started when the application
     72             is first launched.</stentry>
     73         </strow>
     74         <strow>
     75           <stentry>Create an onStart() method</stentry>
     76           <stentry>Select this option if you would like to have an empty onStart() method included in your activity.</stentry>
     77         </strow>
     78       </simpletable>
     79     </section>
     80   </refbody>
     81 </reference>
     82