190 CHAPTER 6: Android Screen Design: Writing to the Display Using Activity and View
To confirm that you have solved your contrast problem, use the Run As ➤ Android Application
menu sequence, and compile and run your Hello Universe application. What you should see
should look like the middle section of Figure 6-20, and your Galaxy Information Screen’s Galaxy
characteristics text labels should now be readable!
Nested LinearLayout Containers: Creating a More Complex UI
To add in the
display the actual Galaxy object data values, we cannot simply add seven more
tags into the existing
labels, and not to the right of them.
The solution to this UI layout problem using
LinearLayout child containers inside of a parent LinearLayout container configured as a horizontal
layout, which will place two rows of (matching) text next to each other horizontally, kind of like a
spreadsheet would. At a high-level tag overview, using pseudo markup, if you will, the basic XML
structure that you will be building soon would look something like this:
Figure 6-22. Add android:textColor=“#FFFFFF” parameters to all eight