Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  2. @Override
  3. public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
  4. Toast.makeText(MainActivity.this,movies.get(position).getName(),Toast.LENGTH_SHORT).show();
  5. Intent intent = new Intent(MainActivity.this,MovieDetailActivity.class);
  6. intent.putExtra("movie",movies.get(position));
  7. startActivity(intent);
  8.  
  9.  
  10. }
  11. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement