as for today lets see how android source code looks like its petty easy to create new android application go to FILE-->new--> androidapplication if you wont able to see android application here then go to FIle-->new-->other and you will be able to see new android application project and cnrl+N is short cut key for it if your not able to see it then your devlopment environment is not set properly and feel free to contact me if you got any issues with it once you have

you will be presented with dailogue asking for application name package name and project name give any of values you instead example as filled in the image

click next next till you reach finish well its ask for few things like want icon or default activity default values for now and you will learn more about in future and your new application is ready its default application and eclipse and our adt created all required folders and linked required android sdk in to your application with out eclipse you need to create all those folders and subfolders manually and rename them correctly if your not able to give exact names like instead of res Res your gone you need to check where it is gone
and thanks to eclipse and pre loaded libraries we wont required to bother about creating all those folders and concentrate on coding part let see what eclipse has created for us
see my applicaation project file is abdurl rahman assudais first folder say android 2.2 it means it saying your application is using next folder android dependencies it will include all third party jar java archive files they also contains code of third party people that we want to use like see you can like our startapp code we use start app to monitize and other jars net comes our source folder here coding files goes you can see first.java and other stuff these are java files that we need to create and we will defile android code i mean we will define our app functionality next gen folder and package list it contains r.java file thats generated automatically that will include refrece of all variables images and layouts that we will use in our application you will learn about it in later state refrenced libraries assests bin and lib all re predefined stuff we wont bother much about them next folder is our res folder it will look someting like thisthe
the res folder contains drabwable-hdpi as you can see in image above it will hold all imge files that we will use in our application and they can be refrenced programatically though refrence stored in R.java that system will take care off here hdpi mdpi xhdpi stands for highdefination median defination and xtra high defination take a example of application icon and if you wanna define different application icons for different phones depending on their resolution you can make three different icons with three different resolutions and app will automatically selects and chooses icon depending on phone resolution
menu it had menu xml file that will be used to inflate menu when user clicks menu button of phone and that must be linked in src java files how and what should happen when menu button is clicked next values folder it contains string values like app name theme and all above it there is other folder called layout here we will be writing how our app should appear i mean adding buttons to our app backgrounds views and other stuff we need do it in layout folder and xml files well eclipse has graphical layout that allows us to create layouts using drag and drop method instead of hard coding in xml code and that comes with eclipse and adt plugins and android sdk stuff
next file important one android manifest file it does have two views graphical view and code view you can toggle between these views at buttons at bottom well i think article gone too lengthy cutting down further writing maniefest is something where we need to mention all the stuff we use its like bridge to our app we need to add activities in it package name permissions that user need give to use our app and other stuff that is for now i will try to go more details in next instalation inshallah hope this tutorial helped atleast a bit to know about android



No comments:
Post a Comment