126 CHAPTER 4: Introduction to XML: Defining an Android App, Its Design, and Constants
I am going to show you how to use this now, as well as later in the book, as you can sometimes use it to
preview UI designs that you create using XML, and can actually use it to create these designs visually.
For the sake of learning XML and Android development in this book, I will be referencing this tab to create
previews of UI designs using XML, so you don’t have to go through the more time-consuming Run As ➤
Android Application AVD work process, which we took a look at a bit earlier in this chapter.
You can switch back and forth between XML editing view and the GLE by clicking the bottom-mounted
tabs, which you can see in Figure 4-19, and are labeled with your XML file name for the XML editing
view and the GLE name for the Graphical Layout view. Whatever you have your cursor clicked on
(or inside of) in the XML editing view will be selected in the GLE when you switch over (in this case,
a TextView).
As you can see in Figure 4-19, there is a Palette pane on the left, where you can select and drag and
drop UI widgets onto your design, as well as an Outline pane containing your UI design hierarchy
on the right, and even a handy Properties pane, where you can set the properties (also known as
parameters) for your UI element tags.
If you want to add parameters to your TextView tag, you can do it in the Properties pane and then
switch back into XML editing mode to see the XML markup which Eclipse ADT has written for you.
This is a good way to learn about the XML parameters that are available to you for any given UI
element tag, so be sure and play with this GLE feature when you have a chance!
Figure 4-19. The