public class ImageViewActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
Integer[] ImgPreview = { R.drawable.mlview1, R.drawable.mlview2,
R.drawable.mlview3 };
super.onCreate(savedInstanceState);
setContentView(R.layout.image_prev);
Intent intent = null;
Bundle b = intent.getExtras();
int position = b.getInt("position");
// here, what to do?
if (position == 0) {
}
From the previous activity, it fetches the parameter “position” , on the basis of the value of “position”, it should display the image. for ex: if position 0, then image “mlview1” is displayed and so on.
Write this..