Friday, 27 December 2013

Create Button in Android

Today we are going to create a button with Toast message. Create a project (Follow this tutorial ) for creating a button

Step 1:

Click on the project name --> find SRC folder --> Inside the SRC folder you can see your package name com.example.helloworld --> click on the package --> now you can see your java file (MainActivity.java)




Step 2:
Double click on the MainActivity.java 




Step 3:

Click on RES folder -->click LAYOUT Folder --> double click on activity_main.xml



Step 4:

Change default code like this, which is generated at the time of project created (Whole project attached below)



No comments:

Post a Comment