Monday, 18 March 2013

A Brief Introduction to the Android

Hello Friends,
This is my first post In the blog "Beginning of Android Development", Here I will tell you some introductory part of Android.
1.What Android Is..?
Android defined as a software stack, this stack includes Operating System(modified version of Linux kernel),
Middleware(software that connects the low-level operating system to high-level apps), and key Apps(written in Java) such as web browser and contact  manager.
2. What kind of Architecture it has..?
The Android software stack consist of Apps at the top, Middlware(consisting of application framework, libraries, and Android run-time) in the middle, and Linux kernel with various drivers at the bottom

3. What Activity Is..?
In Android every thing is done in Activity. Activity is a component that present a user interface screen with which the user interact.
4.Example-
Here I given the simple example of Hello Android, It has two important file one with the extension of .xml which contains code of layout(user interface), and other is .java contains the code implementation. 
//main_activity.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >
    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello Android" 
        android:textSize="20sp"
        android:gravity="center"/>
</RelativeLayout>
//MainActivity.java
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
//Output

Next post will release in the next week.

Thank You,