Android Directory structure
Android folder structure consists hierarchy of the files:
- gen(Generated jave files)
- Android version
- res drawable-hdpi
Let us check the function of each folder below:
The gen directory in android directory structure contains the autogenerated files. It contains R.java that is automatically generated by eclipse when you craete a new project.
The res directory in android folder structure contains all the resources related to the project. The res folder is used to keep the files like images, xml files separate from the source code.
The main difference between res and asset folder is that. The files stored in the res folder can be used to reference from the code. You can add the code to access these files anywhere within the application, but the files that are stored in the asset folder , you cannot reference it.
R.drawable.id : This code is used to reference these values. Every resource that is added in the resource folder is assigned an id and it can be called using that id.
It is used to define string of values, color , dimensions etc
This folder contains layout to be used in the application.
This contains many subfolders
this folder stores bitmap for high density. The app automatically takes the images from the corresponding folder based upon the hardware of the mobile. So we have to just place the different density files in the appropriate folders, and the system automatically takes it .
this folder stores bitmap for medium density
this folder stores bitmap for low density.
This folder in android folder structure is used to store anything you want to store in the application.
Androidmanifest.xml file :
This is the main file, that controls all the components of the application. This file is in xml format.
Read next part
138total visits,1visits today