118 CHAPTER 4: Introduction to XML: Defining an Android App, Its Design, and Constants
In fact, Eclipse ADT also added a Console tab, as well as a LogCat tab, so now you have five
different error investigation tabs at your disposal at the bottom of Eclipse, rather than just three! It is
also interesting to note between Figure 4-11 and 4-12 that Eclipse ADT spells logcat three different
(capitalization) ways: Logcat in the dialog title, logcat in the dialog text area, and LogCat in the tab
used in the Eclipse ADT IDE. I prefer LogCat, as it stands for Error Log Catalog (for errors) and so
I will used that capitalization during the rest of this book.
Next, let’s play around with the styles.xml XML style (OS theme in this case) definition, to see
how you can easily edit XML parameters in order to elicit some fairly drastic changes to how an
application looks and feels!
Changing the App’s Theme using XML: HOLO Dark
Since our current application is running under Android 4.4.4, as we specified in the Target SDK of
API Level 19, in the first of the New Android Application Project series of dialogs back in Chapter
3 (Figure 3-3), we would need to edit the styles.xml file, which is in the /res/values-v14 alternate
resources folder to see this change inside of the Nexus One AVD, which is running as an Android 4.x
device emulator.
Let’s remove the Holo Light designation, and the Dark ActionBar, by setting the parent= parameter
to simply refer to the android:Theme.Holo constant setting, as the default Holo OS theme is Dark
as its default setting. This is shown in Figure 4-12, and simply involves back-spacing over the
.Light.DarkActionBar position of the OS theme constant shown back in Figure 4-7. Once you run
your AVD emulator again, which we are going to do next, you will see the change to the application’s
look and feel.
To test your new OS theme in the Nexus One AVD, use your Run As ➤ Android Application work
process to launch the emulator, and check out your new “darker” application look and feel, which is
shown in Figure 4-13.
Figure 4-12. Changing your application OS theme to the Holo (Dark) theme in the /res/values-v14/styles.xml