TvQuran

Saturday, April 7, 2012

The Way To Android : Lesson 3


The Way To Android : Lesson 3
-----------------------------
  • Agenda :
1 - Create your first android application
2 - Run your android application on simulator 
3 -  Examining your android project 

1 - Create your first android application
------------------------------------------------------
  1. open your eclipse ( with ADT plugin installed and SDK integrated )
  2. from file menu choose --> new project 








2 - Run Your android application 
------------------------------------------------------

  1. Right click on your android project 
  2. choose run as --> android application 
  3. after run your project 



3 - Examining your android project
------------------------------------------------------
when you create a new android application . you get some several items in the project root directory , including the following : 

  1. AndroidManifest.xml: An XML file that describes the application being built and what     components (activities, services, etc.) are being supplied by that application

  2. bin/:
    The directory that holds the application once it is compiled
  3. libs/:
    The directory that holds any third-party JARs your application requires
  4. res/:
    The directory that holds resources, such as icons, GUI layouts, and the like, that are packaged with the compiled Java in the application.
  5. src/:
    The directory that holds the Java source code for the application.



----------------------------------------------------------------------------------------------------

In addition to the preceding file and directories, you may find any of the following in Android projects :



  1. assets/: 
    The directory that holds other static files that you want packaged with the   application for deployment onto the device.
  2. gen/: 
    The directory in which Android’s build tools place source code that they generate
  3. build.xml and *.properties: 
    Files that are used as part of the Ant based command-line build process, if you are not using Eclipse
  4. proguard.cfg
    A file that is used for integration with ProGuard to obfuscate your Android code
----------------------------------------------------------------------------------------------------------------------------


The REST of Story 
--------------------------
Now we will explain some subdirectories you will  find under -----> res/:


  1. res/drawable/: For images (PNG, JPEG, etc.)
  2. res/layout/: For XML-based UI layout specifications
  3. res/menu/: For XML-based menu specifications
  4. res/raw/:
     
    For general-purpose files (e.g., an audio clip or a CSV file of account information)
  5. res/value/: For strings, dimensions, and the like
  6. res/xml/: For other general-purpose XML files you wish to ship

-----------------------------------------------------------------------------------------

One of the most important file in your application is the manifest file : It
 contain the basic info about your  application 


The element supplies :

  1. android:name for the class implementing the activity
  2. android:label for the display name of the activity
  3. <intent-filter> :
    child
    element describing under what conditions this activity will be displayed
  4. element sets up your activity to appear in the launcher, so users can choose to run it. As you’ll see later in this book, you can have several activities in one project, if you so choose.



Now we know how to create our first project and what is the project structure  



To Be Continued


Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

1 comments: on "The Way To Android : Lesson 3"

Anonymous said...

Great effort

Post a Comment