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 activityCreator.py application shipped in the tools/ menu of the SDK. See Building an Android Sample Application for more information on using activityCreator.py.

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 AndroidManifest.xml.

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/

animationl .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.

0 0

Post a comment