I once killed a couple of days to find an answer. I did not find a solution specifically for this approach. but found a slightly different approach:
Create a layout with the desired View in the root, apply a style to it in this layout file.
When you need to create a View programmatically, use code like this:
TextView textView = (TextView) getLayoutInflater().inflate(R.layout.styled_text_view, null);
Well and, just in case, an example styled_text_view.xml :
<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/featured" style=" @style /MenuItemTextStyle" />