O'Reilly logo

Android Programming: The Big Nerd Ranch Guide by Brian Hardy, Bill Phillips

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating CrimeFragment’s View

Now that the model layer is updated, you can turn to updating the view layer. In particular, CrimeFragment will display a thumbnail-sized photo in an ImageView.

Figure 20.7  CrimeFragment with new ImageView

CrimeFragment with new ImageView

Adding an ImageView

Return to layout/fragment_crime.xml and add the ImageView shown in Figure 20.8.

Figure 20.8  CrimeFragment layout with ImageView (layout/fragment_crime.xml)

CrimeFragment layout with ImageView (layout/fragment_crime.xml)

You also need an ImageView in the landscape layout, as shown in Figure 20.9.

Figure 20.9  Landscape layout with ImageView (layout-land/fragment_crime.xml ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required