Your SlideShare is downloading. ×
Button Click event in Android, Android Training Ahmedabad
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Button Click event in Android, Android Training Ahmedabad

2,718

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. …

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
2,718
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
28
Comments
1
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Prepared By, NicheTech © NicheTech Com. Sol. Pvt. Ltd.Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  • 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. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  • 4.  Create on class named activity2 Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  • 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.  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.  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. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  • 9. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  • 10. After Clicking on the button Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd
  • 11. Prepared By, NicheTech (C) NicheTech Com. Sol. Pvt. Ltd

×