I am programmatically creating a LinearLayout for an AlertDialog with some buttons.
I WANT to do this:
Hope I'm not too late to join the party :)
Well, Styles can be applied to a View at initialization phase. For example:
View
LinearLayout button = new LinearLayout(context, null, android.R.style.ButtonBar);