For the More Curious: More on Style Inheritance

The description of style inheritance earlier in the 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.

<​s​t​y​l​e​ ​n​a​m​e​=​"​P​l​a​t​f​o​r​m​.​A​p​p​C​o​m​p​a​t​"​ ​p​a​r​e​n​t​=​"​a​n​d​r​o​i​d​:​T​h​e​m​e​.​H​o​l​o​"​>​
 ​ ​.​.​.​
<​/​s​t​y​l​e​>​

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 ...

Get Android Programming: The Big Nerd Ranch Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.