Last active
August 22, 2018 14:02
-
-
Save Devansh-Maurya/b3da5393871bcfff75b248a02ecf02e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ListView petListView = findViewById(R.id.list); | |
petListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { | |
@Override | |
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { | |
Intent intent = new Intent(CatalogActivity.this, EditorActivity.class); | |
Uri currentPetUri = ContentUris.withAppendedId("content://com.example.android.myapplication/pets", id); | |
intent.setData(currentPetUri); | |
startActivity(intent); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment