O'Reilly logo

Android 5 Programming by Example by Kyle Mew

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

Adding images and text to the layout

We will now use our CardView to display some basic information, namely a photo, a title and a short piece of text. To do this, you will need to locate where the studio stores your project files. This directory will be called AndroidStudioProjects and will more than likely be located in your Home directory or your specified save location.

  1. Locate your AndroidStudioProjects directory, and open the \StonehengeGuide\app\src\main\res\drawable folder. This can be done by right-clicking on the drawable in the project explorer and selecting Show in Explorer from the menu.
  2. Find an image and save it in the drawable directory. Any image will do; the one I use here is called stonehenge.png and is roughly 640 x 480 pixels. ...

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