Pages

Sunday, February 16, 2014

how to make simple android app in 9 minute


For making any android apps you should have ADT bundle. you can download form here https://developer.android.com/sdk/index.html . after downloading extract the zip file.

You can watch video also :http://www.youtube.com/watch?v=wjACU_7u7F4

Step 1:
Open eclipse and go to File > new >Android application project . and select the application name for example "simple"and next-next.

Step 2:
add one EditText box and two button on the activity_main.xml . and add onclick on both the button.
(for eg. "hi" on one button and "reset" on other button )

Step 3:
Declare the EditText in MainActivity.java  and also make onclick function.

EditText e1;
e1=(EditText) findViewById(R.id.editText1);

public void hi(View v)
{
e1.setText("hiii....");
}

public void reset(View v)
{
e1.setText("");
}

Step 4:
Run MainActivity.java file.your apps is ready.

No comments:

Post a Comment