I was just facing the same problem and the solution with margins is in defining style on every button in every layout like this:
<TableRow
android:layout_weight="1"
android:orientation="horizontal"
android:baselineAligned="false"
android:clickable="false"
android:layout_height="fill_parent"
android:layout_width="match_parent">
<Button
style="@style/Button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="1"
android:id="@+id/button1"
android:layout_weight="0.06"
android:clickable="true" />
<Button
style="@style/Button"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="2"
android:id="@+id/button2"
android:layout_weight="0.06" />
<Button
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:text="3"
android:id="@+id/button3"
android:layout_weight="0.06"
android:layout_marginBottom="2dp" // This works
android:layout_marginTop="2dp" />
</TableRow>
//...
So, you don't even need to add it to theme in this case.