Android Programming The Big Nerd Ranch Guide by Bill Phillips, Chris Stewart, Kristin Marsicano (z-lib.org)

(gtxtreme123) #1

Chapter 9  Creating User Interfaces with Layouts and Widgets


Repeat the process with the crime_date widget to set its width and height. Now, the two widgets
overlap but are much smaller (Figure 9.13).


Figure 9.13  Overlapping TextViews


Adding widgets


With your other widgets out of the way, you can add the handcuffs image to your layout. Add
an ImageView to your layout file. In the palette, find ImageView (Figure 9.14). Drag it into your
component tree as a child of ConstraintLayout, just underneath crime_date.


Figure 9.14  Finding the ImageView

Free download pdf