Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onClick(View v) {
- // Retrieve the text entered from the EditText
- guesstxt = guess.getText().toString();
- nametxt = name.getText().toString();
- numbertxt = number.getText().toString();
- dobtxt = dob.getText().toString();
- ParseObject prediction = new ParseObject("prediction");
- prediction.put("Guess", guesstxt);
- prediction.put("Name", nametxt);
- prediction.put("Contact Number", numbertxt);
- prediction.put("DOB", dobtxt);
- prediction.saveInBackground(new SaveCallback() {
- public void done(ParseException e) {
- if (e == null) {
- // Saved successfully.
- Toast.makeText(getApplicationContext(), "Saved", Toast.LENGTH_SHORT).show();
- } else {
- // The save failed.
- Toast.makeText(getApplicationContext(), "Failed to Save", Toast.LENGTH_SHORT).show();
- Log.d(getClass().getSimpleName(), "User update error: " + e);
- }
- }
- });
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement