Prepared By,
NicheTech
© NicheTech Com. Sol. Pvt. Ltd.Prepared By, NicheTech (C) NicheTech Com. Sol.
Pvt. Ltd
 Android is same as other programming language like
.NET, PHP and JAVA but the only one difference is it run
on the mobil...
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
 Create on class named activity2
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
 Create one copy of main.xml file by right click on the
res/layout folder, and click on the paste button and give
the fil...
 So my main page that means main .java file
main.xml contain designing code and lets it’s server side
code will contain T...
 First of all we will write the code for page1. but before
writing the code we need to define our page named
activity2.
...
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
After
Clicking on the
button
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
Upcoming SlideShare
Loading in …5
×

Button Click event in Android, Android Training Ahmedabad

3,049 views

Published on

NicheTech Computer Solutions is the best web development company in Ahmedabad which is helping MCA , BCA , MSC IT students in Ahmedabad, Gujarat , India.

MCA Project Training Ahmedabad , Android Training Ahmedabad , Android Classes Ahmedabad

Android Live Project Training : http://facebook.com/nichetechinstituteindia ,

Android classes Ahmedabad : http://twitter.com/nichetechins

Android Training Ahmedabad : http://www.slideshare.net/nichetechinstitute ,

http://liveprojecttraining.in/

Published in: Education, Technology
1 Comment
2 Likes
Statistics
Notes
  • how to add Activity2.java file?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
3,049
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
32
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Button Click event in Android, Android Training Ahmedabad

  1. 1. Prepared By, NicheTech © NicheTech Com. Sol. Pvt. Ltd.Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  2. 2.  Android is same as other programming language like .NET, PHP and JAVA but the only one difference is it run on the mobile device so let’s start the simple button click event process.  Open the file named main.xml inside the folder named res to layout.  Then after using either Graphic Layout or main.xml page create one button and one textbox. Check out the next slide. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  3. 3. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  4. 4.  Create on class named activity2 Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  5. 5.  Create one copy of main.xml file by right click on the res/layout folder, and click on the paste button and give the file name activity2.xml.  Now let’s understand why we have created new .xml file  Consider the activity2.xml file as page 2 and main.xml file as page1.  My page1 contain one button and one textbox where I will fill the value and that value I suppose to display into Page2 Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  6. 6.  So my main page that means main .java file main.xml contain designing code and lets it’s server side code will contain TestoneActivity.java  Same way activity2.xml file contain the designing code and it’s server side code contain Activity2.java file  So till now we have write the code for designing now it is time to write let’s say server side code inside .java file. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  7. 7.  First of all we will write the code for page1. but before writing the code we need to define our page named activity2.  Here for understanding purpose consider this file as confi file which contain all page( activity information). I have created new page so give the activity name as Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd Our page Information With prefix “ . “
  8. 8. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  9. 9. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  10. 10. After Clicking on the button Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  11. 11. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd

×