For the More Curious: More on Style Inheritance

The description of style inheritance earlier in this chapter does not explain the full story. You may have noticed a switch in inheritance style as you were exploring the theme hierarchy. The AppCompat themes used the name of the theme to indicate inheritance until you arrive at the Platform.AppCompat theme.

    <style name="Platform.AppCompat" parent="android:Theme.Holo">

Here, the inheritance naming style changes to the more explicit parent attribute style. Why?

Specifying the parent theme in the theme name only works for themes that exist in the same package. So you will see the Android OS themes use the theme-name inheritance style most of the time, and you will see ...

Get Android Programming: The Big Nerd Ranch Guide, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.