Time for action - making the gallery work
Now that we've got the
GalleryAdapter working, we need to connect the
GalleryAdapter, and the
ImageView together, so that when a thumbnail is selected, the full-view of that image is displayed in the
- Open the
ReviewActivitysource code in your editor or IDE.
AdapterView.OnItemSelectedListenerto the interfaces that the
- Below the declaration of the
TextSwitcher, declare a reference to the
ImageViewwhich will hold the full-size image:
private TextSwitcher switcher; private ImageView photo;
- At the end of the
onCreatemethod, find the
photoand assign it to the reference you just declared:
photo = ((ImageView)findViewById(R.id.photo)); ...