Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. public void onClick(View v) {
  2. // Retrieve the text entered from the EditText
  3. guesstxt = guess.getText().toString();
  4. nametxt = name.getText().toString();
  5. numbertxt = number.getText().toString();
  6. dobtxt = dob.getText().toString();
  7.  
  8.  
  9. ParseObject prediction = new ParseObject("prediction");
  10. prediction.put("Guess", guesstxt);
  11. prediction.put("Name", nametxt);
  12. prediction.put("Contact Number", numbertxt);
  13. prediction.put("DOB", dobtxt);
  14. prediction.saveInBackground(new SaveCallback() {
  15. public void done(ParseException e) {
  16. if (e == null) {
  17. // Saved successfully.
  18. Toast.makeText(getApplicationContext(), "Saved", Toast.LENGTH_SHORT).show();
  19. } else {
  20. // The save failed.
  21. Toast.makeText(getApplicationContext(), "Failed to Save", Toast.LENGTH_SHORT).show();
  22. Log.d(getClass().getSimpleName(), "User update error: " + e);
  23. }
  24. }
  25. });
  26.  
  27. }
  28.  
  29. });
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement