I had a hard to debug problem where I wanted to have a layout file with buttons that were completely styled from the Activity code. Because android:layout_width and android:layout_height can’t be set by themes and need be set by specific style="@style/myButton" in the layout files, everything went spaghetti.
Bottom line is I can’t use themes to completely control styles from the Activity code. But completely generating layouts in the Activity code is painful because you don’t get the Graphical Layout View to easily preview changes.
From this wonderful blog post I found a few days too late.