Wednesday, June 25, 2014

I. Getting Started with Android Development


First of all, there are several IDE that can help you develop Android Applications(Eclipse, maven etc).

IDE makes it easier for us to create and develop mobile, web or platform-specific applications.

I'll be using Eclipse for all tutorials, so it would be easier for you if you also use eclipse.
Click here to download eclipse with ADT.

You should also have Java sdk/jdk in your machine.
You can download it here.

Basically, we're going to use the native language of android OS which is JAVA.
For designs or the front part of the applications, we can design it with the IDE that generates XML codes for each item or attributes.


Now let me discuss the structure of a simple android project.
Res - contains layout, strings and values used for the front part of the App.
Src - contains .java files used for functionalities of the App.

Under res folder, there are many files in it. such as string.xml, layout folder etc.
string.xml are collection of strings that can be reference and used for pre-defined or constant string of the application. One example of it's usage is when assigning a value of an EditText(Textbox of Android).
Instead of hard-coding it. you can easily refer to it using its name in the string.xml.
It makes revision easier for us, for example. we have a
<string name="ApplicationName">My Example App</string>
instead of type My Example app for every activities we create, we can easily Refer to it using @string/ApplicationName. If ever we change the content of the ApplicationName, it will also change the value of all the item or object that refers to it. We don't have to search for all the hard-coded text and replace it.

Layout folder contains layoutname.xml that are used as the graphical user interface of an activity.
Here we store different layouts that can be called at the source file setContentView(R.layout.layoutname).







No comments: