Skip to content

Instantly share code, notes, and snippets.

@Devansh-Maurya
Last active August 22, 2018 14:12
Show Gist options
  • Save Devansh-Maurya/c58ff19f5c9b7d0796a9a1a3c37ed1b0 to your computer and use it in GitHub Desktop.
Save Devansh-Maurya/c58ff19f5c9b7d0796a9a1a3c37ed1b0 to your computer and use it in GitHub Desktop.
Intent intent = getIntent();
currentPetUri = intent.getData();
if (currentPetUri == null) {
setTitle("Add a new pet");
} else {
setTitle("Update pet data");
// Initialize a loader to read the pet data from the database
// and display the current values in the editor
getLoaderManager().initLoader(EXISTING_PET_LOADER, null, this);
}
//Perform other actions in the activity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment