Saturday, March 5, 2011

Which are the file required or use for android application?


List of Files for an Android Application
The following list describes the structure and files of an Android application. Many of these files can be built for you (or stubbed out) by the android tool shipped in the tools/ menu of the SDK.


MyApp/

    AndroidManifest.xml
(required) Advertises the screens that this application provides, where they can be launched (from the main program menu or elsewhere), any content providers it implements and what kind of data they handle, where the implementation classes are, and other application-wide information. Syntax details for this file are described in The AndroidManifest.xml File.
    src/
        /myPackagePath/.../MyClass.java
(required) This folder holds all the source code files for your application, inside the appropriate package subfolders.
    res/
(required) This folder holds all the resources for your application. Resources are external data files or description files that are compiled into your code at build time. Files in different folders are compiled differently, so you must put the proper resource into the proper folder. (See Resources for details.)
        anim/
               animation1.xml
                        ...
(optional) Holds any animation XML description files that the application uses. The format of these files is described in Resources.
        drawable/
                      some_picture.png
                      some_stretchable.9.png
                      some_background.xml
                                    ...
(optional) Zero or more files that will be compiled to android.graphics.drawable resources. Files can be image files (png, gif, or other) or XML files describing other graphics such as bitmaps, stretchable bitmaps, or gradients. Supported bitmap file formats are PNG (preferred), JPG, and GIF (discouraged), as well as the custom 9-patch stretchable bitmap format. These formats are described in Resources.
        layout/
                      screen_1_layout.xml
                                 ...
(optional) Holds all the XML files describing screens or parts of screens. Although you could create a screen in Java, defining them in XML files is typically easier. A layout file is similar in concept to an HTML file that describes the screen layout and components. See User Interface for more information about designing screens, and Available Resource Types for the syntax of these files.
        values/
                      arrays
                      classes.xml
                      colors.xml
                      dimens.xml
                      strings.xml
                      styles.xml
                      values.xml
(optional) XML files describing additional resources such as strings, colors, and styles. The naming, quantity, and number of these files are not enforced--any XML file is compiled, but these are the standard names given to these files. However, the syntax of these files is prescribed by Android, and described in Resources.
        xml/
(optional) XML files that can be read at run time on the device.
        raw/
(optional) Any files to be copied directly to the device.

No comments:

Post a Comment