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_options-menu-code-create" xml:lang="en-us">
      4   <title>Generate Options Menu Code Based on xml file</title>
      5   <shortdesc>Generates options menu code from a selected xml-format menu definition file in your project's res/menu
      6     folder. </shortdesc>
      7   <prolog>
      8     <metadata>
      9       <keywords>
     10         <!--<indexterm></indexterm>-->
     11       </keywords>
     12     </metadata>
     13   </prolog>
     14   <refbody>
     15     <section>
     16       <p>This dialog is presented when you select a project in the Package Explorer that has one or more menus in the
     17         project's res/menu folder and then select <menucascade>
     18           <uicontrol>Auto-Generated Code</uicontrol>
     19           <uicontrol>Generate Java Code Based on Menu xml Files</uicontrol>
     20         </menucascade> from the <uicontrol>MOTODEV</uicontrol> menu.</p>
     21       <p>This command can be re-invoked as many times as necessary to accomodate changes to your xml file.</p>
     22       <simpletable>
     23         <strow>
     24           <stentry><uicontrol>Project</uicontrol></stentry>
     25           <stentry>The project into which the menu-handling code is to be added.</stentry>
     26         </strow>
     27         <strow>
     28           <stentry><uicontrol>Target Class</uicontrol></stentry>
     29           <stentry>The Java class (an Activity or Fragement) to which the menu-handling code is to be added. The Generate Options Menu... feature
     30             adds an onCreateOptionsMenu() method that inflates the specified menu. It also adds an
     31             onOptionsItemSelected() method containing an if/else block that provides you with a place to put your menu
     32             item handler code for each item in the menu.</stentry>
     33         </strow>
     34         <strow>
     35           <stentry><uicontrol>Menu xml File</uicontrol></stentry>
     36           <stentry>The xml file in the selected project's res/menu folder that defines the menu for which code is to be
     37             generated.</stentry>
     38         </strow>
     39       </simpletable>
     40     </section>
     41   </refbody>
     42 </reference>
     43