23.07.2015 Views

Android Tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Get intent data<br />

Intent i = getIntent();<br />

// Selected image id<br />

int position = i.getExtras().getInt("id");<br />

ImageAdapter imageAdapter = new ImageAdapter(this);<br />

ImageView imageView = (ImageView) findViewById(R.id.SingleView);<br />

imageView.setImageResource(imageAdapter.mThumbIds[position]);<br />

}<br />

}<br />

Following will be the content of res/layout/single_view.xml file:<br />

<br />

<br />

<br />

<br />

Following will be the content of <strong>Android</strong>Manifest.xml to define two new constants:<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!