Margin defined in XML file to be included has no impact : I am trying to re-use the XML defined for a button in a calculator app but the margin value defined within the Button's XML has no effect after it is included in a layout file.

Button's XML:

    <?xml version="1.0" encoding="utf-8"?>
    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:text="@string/standard_sqrt"
        android:gravity="center"
        android:textStyle="italic"
        android:textSize="25dp"
        android:padding="16dp"
        android:background="@drawable/dark_button_selector"
        android:layout_height="wrap_content"
        android:layout_width="wrap_content" 
        android:layout_margin="5dp"/>

Button seems to be handling margin pretty well on its own:

[![Button Layout][1]][1]



Now, I am simply including it in a TablowRow like this:

    <TableRow
         android:layout_weight="2"
         android:gravity="center">
         <include layout="@layout/button_component" />
         <include layout="@layout/button_component" />
         <include layout="@layout/button_component" />
         <include layout="@layout/button_component" />
     </TableRow>

No matter what value I assign the margin/height/width of the Button, they act the same when included in the table row (i.e without any spaces between them).

[![Included buttons][2]][2]


  [1]: https://i.stack.imgur.com/P0FRP.png
  [2]: https://i.stack.imgur.com/cnZNR.png