Navigation Drawer Activity

+1 sravani tvns · January 4, 2016
I am using navigation drawer activity and in the side menu I am adding fragements to the menu and in the fragment I have a form. When I submit the form. I have to write the code for the submit button. so, I need an example for a form submision.

Post a Reply

Replies

Oldest  Newest  Rating
0 David Frenzel · January 14, 2016
Go into your design view of your fragment, click on the button and then specify an onClick method in the properties (or by using the text window: add android:onClick="doSomethingWhenButtonIsClicked" to your button manually). Then create a function which is called the same as the one you just defined as your onclick method:
public void doSomethingWhenButtonIsClicked (View view) {
// add your code here that you want to be executed when the button is pressed
}

Then add the code you need for that method and done. 

Don't try to look for whole code examples just to copy and paste here. If you understand the basics of android programming you should be able to easily figure this out :) If not, just go back and watch some videos from Bucky! :D
  • 1

Java / Android Development

107,147 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator