Guest User

Untitled

a guest
May 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.47 KB | None | 0 0
  1. public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
  2.                 setContentView(R.layout.image);
  3.                 Context context = getApplicationContext();
  4.                 ImageView imageView = new ImageView(context);
  5.                 imageView = (ImageView) findViewById(R.id.imageView1);
  6.                 imageView.setImageResource(R.drawable.pic1); // Need this to change for each picture by changing 'pic1' to 'pic(position+1)'
  7.             }
Add Comment
Please, Sign In to add comment