Created by Jason Manns
almost 8 years ago
|
||
Copied by Jason Manns
almost 8 years ago
|
||
Question | Answer |
You have a ListView of names set up that displays a list of 10 usernames. Write the click listener so when a named is clicked a new activity is started and and sent which name was clicked. | @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Intent intent = new Intent(getApplicationContext(), Profile.class); intent.putExtra("friend", friends.get(position)); startActivity(intent); } |
Want to create your own Flashcards for free with GoConqr? Learn more.