I am using two activities. One activity displays images in a GridView
and by clicking on a particular image in that GridView
it should display the
In MyGridView: (someInteger is an integer that represents the index of the selected image
Intent myIntent = new Intent(this, MyImageViewActivity.class);
Bundle bundle = new Bundle();
bundle.putInt("image", someInteger);
myIntent.putExtras(bundle);
startActivityForResult(myIntent, 0);
In MyImageViewActivity:
Bundle bundle = this.getIntent().getExtras();
int pic = bundle.getInt("image");
of course, you can put anything in the bundle! maybe a byte array or something
Pass the image URL/Uri instead of passing raw image data.
I suppose you need use Intent class.
Intent intent = new Intent(YourSourceActivity.this, TargetActivty.class);
Bundle addinfo = new Bundle();
addinfo.putInt("imageid", someid);
intent.putExtras(addinfo);