I am programmatically creating a LinearLayout for an AlertDialog with some buttons.
I WANT to do this:
This is the only answer that actually delivered what I was looking for: http://belencruz.com/2013/04/set-styles-programmatically-in-android/
Essentially, create a layout XML file that simply has a element with the style you want. Then, inflate it programmatically and just customize the button text.
Something along the lines of:
In code:
Button button = (Button)getLayoutInflater().inflate(R.layout.your_custom_button_layout_file, null);
button.setText("Your Text");