To assign a style like this
<style name="ButtonHOLO" parent="android:Widget.Button">
<item name="android:background">@drawable/btn_default_holo_dark</item>
<item name="android:minHeight">@dimen/calc_btn_h</item>
<item name="android:minWidth">@dimen/calc_btn_w</item>
<item name="android:textColor">#ffffff</item>
</style>
to a button dynamically you need to use both setBackgroundResource() and setTextAppearance() functions. E.g.:
btn.setBackgroundResource(R.drawable.btn_default_holo_dark);
btn.setTextAppearance(context, R.style.ButtonHOLO);
where
btn_default_holo_dark
is a name of .xml file which describes a selector for your button.