Style Inheritance - margin not inherited


#1

In the challenge for this chapter, I have the following styles.xml:

[code]<?xml version="1.0" encoding="utf-8"?>


0dp
match_parent
30dp
3dp

<style name="ActionButton"
    parent="RemoteButton">
    <item name="android:background">#555555</item>
</style>

[/code]

And the following in my layout file for the fourth row of buttons:

<TableRow android:layout_weight="1"> <Button style="@style/ActionButton"/> <Button style="@style/RemoteButton"/> <Button style="@style/ActionButton"/> </TableRow>

All is as expected, except that the two action buttons are slightly larger than the others, i.e. they don’t seem to have the same margin.
What could be the reason for this?


#2

I guess this is answered at the beginning of the next chapter - changing the background means the default style is no longer applied to the button.