Wednesday 28 November 2012

Hands On eclipse

As In my last post i mentioned,how to create a simple app for android which runs in the environment of eclipse.
Today, i will introduce you eclipse lookup like solution explore, toolbox an all good things which comes with eclipse IDE.


                                           
This image shows basic lookup of eclipse IDE, at starting point. 

Let me, tell you files are comes within your project folder,when you creating any android project...
Here, i have created a project with the name of Hello Workshop (File->New->other/Android Project) which is availble to us in project explore.

Every project contain similar structure as like,



Folder Structure.. -->
1) src
       As we know android app is runs on java source code. it means it posses classes. & for better way all classes are hold inside comman package. 
same way,src folder contain your package that you declare at the time of creating your android project(As here, i declared here{com.examples}) where my all classes about my project are available for me.


                    

2) gen
     As, name indicates gen is dealing with generated resources.above image will help to clearify auto generated file named as R.java which contain all resources specification that you cant modify.

3) Android 2.2
    It is the real magical part is where all supporting packages,classes,methods are bundled inside of it. which we are using in our whole project (in terms of classes,methods) as like 
   when i writing, 
                        class HelloWorkshop extends Activity

on my java class,it means
                     I am extending my class with Activity class which is wrtiten present inside of Android 2.2 packages. so i can use its all method of Activity
in my HelloWorkshop class.
                     Methods, like
onCreate(), onPause(),onResume(),............

   
4) bin
when we Running our app on emulator ,it creates an .apk (installation file).& that is located in bin folder.


5) res
  it contain all resourcses. in terms of images in drawable folder. it also has subfolder like layout,values.


    layout : it contain .xml file ,it has UI elements & their structure specification coded in xml file.
which looks like ..
  
 <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

</LinearLayout>

  
6) AndroidManifest.xml 
         It contains,The manifest presents essential information about the application to the Android system, information the system must have before it can run any of the application's code. 
for more information about   AndroidManifest.xml .





No comments:

Post a Comment