CHAPTER 6: Android Screen Design: Writing to the Display Using Activity and View 189
Creating UI Contrast: The TextView Color Parameter
Let’s add a space character after the android:text parameter in our first hello_world
tag, and use the android: work process to bring up the parameter helper dialog. As you can see in
Figure 6-21, I actually typed in android:t which “refined” the parameters displayed in this dialog, to
only include those parameters that begin with the letter “t,” which, as you can see, gives me all of
the android:text related parameters!
Figure 6-21. Change the
The second parameter is the one I am looking for, android:textColor. So, I selected that one, by
double-clicking on it, so that Eclipse will automatically insert it into my XML mark-up for the
hello_world
that the Android OS understands.
The android:textColor parameter takes a “hexadecimal” or Base-16 color value, which we will be
looking at in greater detail in Chapter 9 on graphic design. For now, all you need to know is the
hexadecimal representation for the color white is #FFFFFF, and thus, that is the color data value
you will need to utilize inside of the quotation marks, once Eclipse has written the empty parameter
for you.
Once you have modified this first
this one parameter (make sure to copy the space character in front of the parameter along with it)
and simply paste it into the other seven
XML mark-up is getting pretty dense and is about to get even more complex, as we have to add in
seven more