Sorry about the confusing question title, wasn't sure how better to phrase it...
The problem is that I have a bunch of downloaded image thumbnails on the screen. If any one of them is clicked, a new activity should be launched that features (amongst other things) a larger version of the image.
It works fine for some of the images, but I realised by happenstance that for more than half of the images it just does nothing. The code is executed (I get log messages) but nothing happens.
ImageView imageView = new ImageView(this);
imageView.setImageBitmap(locationBitmap.bitmap);
imageView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View image) {
Log.i(this.getClass().getName(), "You selected location: " + locationBitmap.location);
Intent i = new Intent(context, AnswerActivity.class);
i.putExtra("question_text", question_text);
i.putExtra("question_title", question_title);
i.putExtra("location", locationBitmap.location);
i.putExtra("bitmap", locationBitmap.bitmap);
Log.d(this.getClass().getName(), "About to start the activity...");
context.startActivity(i);
Log.d(this.getClass().getName(), "Started the activity...");
}
});
All of the log messages are produced correctly, but sometimes the activity doesn't change and sometimes it does. Any ideas?