Android Programming The Big Nerd Ranch Guide, 3rd Edition

(Brent) #1
The graphical editor

187

Select the ConstraintLayout view in the component tree, then choose the Clear All Constraints option
from Figure 9.8. You will immediately see a red warning flag with the number 4 at the top right of the
screen. Click on it to see what that is all about (Figure 9.9).


Figure 9.9  ConstraintLayout warnings


When views do not have enough constraints, ConstraintLayout cannot know exactly where to put
them. Your TextViews have no constraints at all, so they each have a warning that says they will not
appear in the right place at runtime.


As you go through the chapter, you will add those constraints back to fix those warnings. In your own
work, keep an eye on that warning indicator to avoid unexpected behavior at runtime.


http://www.ebook3000.com

Free download pdf